If the error is an exception with a code between 400 and 599, returns
the exception code.
Otherwise, retrieves the code from the response; if not present, or
less than 400 or greater than 599, returns 500; otherwise, returns it.
public static getStatusCode ( mixed $error, Psr\Http\Message\ResponseInterface $response ) : integer | ||
$error | mixed | |
$response | Psr\Http\Message\ResponseInterface | |
return | integer |