OAuthException
Less than 1 minute
OAuthException
Base class for errors reported using the OAuth 2.1 {error, error_description} shape.
class OAuthException extends \Hazaar\ExceptionExtends: Hazaar\Exception
/token and /register report these as a JSON body; /authorize reports them by redirecting back to the client's redirect_uri with the same fields as query parameters (RFC 6749 §4.1.2.1).
Properties
errorCode
private readonly string $errorCodeType: string
Methods
__construct
public __construct(string $errorCode, string $errorDescription, int $httpStatus = 400): voidParameters
| Parameter | Type | Description |
|---|---|---|
$errorCode | string | |
$errorDescription | string | |
$httpStatus | int |
getErrorCode
The error field value, e.g. invalid_grant.
public getErrorCode(): stringReturns: string
getErrorDescription
The error_description field value.
public getErrorDescription(): stringReturns: string
toArray
public toArray(): arrayReturns: array
Generated by Hazaar API Doc Generator on Sun, 23 Aug 2026 10:49:43 +0000