class Exception extends Exception (View source)

Properties

protected $errors

Optional list of errors returned in a JSON body of an HTTP error response.

Methods

__construct(string $message, int $code = 0, Exception|null $previous = null, array<string,string>[]|null $errors = [])

Override default constructor to add the ability to set $errors and a retry map.

array<string,string>[]|null
getErrors()

An example of the possible errors returned.

Details

__construct(string $message, int $code = 0, Exception|null $previous = null, array<string,string>[]|null $errors = [])

Override default constructor to add the ability to set $errors and a retry map.

Parameters

string $message
int $code
Exception|null $previous
array<string,string>[]|null $errors

List of errors returned in an HTTP response or null. Defaults to [].

array<string,string>[]|null getErrors()

An example of the possible errors returned.

[ { "domain": "global", "reason": "authError", "message": "Invalid Credentials", "locationType": "header", "location": "Authorization", } ]

Return Value

array<string,string>[]|null

List of errors returned in an HTTP response or null.