src/Exceptions/Handler.php
protected function getStatusCodeFromException(Exception $exception)
    {
        if ($exception instanceof OAuthException) {
            return $exception->httpStatusCode;
        }

        if ($exception instanceof HttpResponseException) {
            return $exception->getResponse()->getStatusCode();
        }

        if ($exception instanceof ValidationException) {
            return 422;
        }

        if (method_exists($exception, 'getStatusCode')) {
            return $exception->getStatusCode();
        }

        return 500;
    }
protected function getStatusCodeFromException(Exception $exception)
    {
        if ($exception instanceof OAuthException) {
            return $exception->httpStatusCode;
        }

        if ($exception instanceof HttpResponseException) {
            return $exception->getResponse()->getStatusCode();
        }

        if ($exception instanceof ValidationException) {
            return 422;
        }

        if (method_exists($exception, 'getStatusCode')) {
            return $exception->getStatusCode();
        }

        return 500;
    }
protected function getStatusCodeFromException ( Exception $ exception ) { if ( $ exception instanceof OAuthException ) { return $ exception -> httpStatusCode ; } if ( $ exception instanceof HttpResponseException ) { return $ exception -> getResponse ( ) -> getStatusCode ( ) ; } if ( $ exception instanceof ValidationException ) { return 422 ; } if ( method_exists ( $ exception , 'getStatusCode' ) ) { return $ exception -> getStatusCode ( ) ; } return 500 ; }
Returns the status code for a given exception.

@param Exception $exception
@return int
Returns the status code for a given exception .