diff --git a/src/Exception/OAuthServerException.php b/src/Exception/OAuthServerException.php index 953f8499..a4575a10 100644 --- a/src/Exception/OAuthServerException.php +++ b/src/Exception/OAuthServerException.php @@ -163,6 +163,18 @@ class OAuthServerException extends \Exception return new static('The user credentials were incorrect.', 'invalid_credentials', 401); } + /** + * Server error + * + * @param $hint + * + * @return static + */ + public static function serverError($hint) + { + return new static('\'The authorization server encountered an unexpected condition which prevented it from fulfilling the request.', 'server_errror', 500, $hint); + } + /** * @return string */