class ApiException extends Exception

ApiException Class Doc Comment

Properties

protected stdClass|string|null $responseBody

The HTTP body of the server response either as Json or string.

protected string[]|null $responseHeaders

The HTTP header of the server response.

protected stdClass|string|null $responseObject

The deserialized response object

Methods

__construct(string $message = "", int $code = 0, string[]|null $responseHeaders = [], stdClass|string|null $responseBody = null)

Constructor

string[]|null
getResponseHeaders()

Gets the HTTP response header

stdClass|string|null
getResponseBody()

Gets the HTTP body of the server response either as Json or string

void
setResponseObject(mixed $obj)

Sets the deserialized response object (during deserialization)

mixed
getResponseObject()

Gets the deserialized response object (during deserialization)

Details

at line 71
__construct(string $message = "", int $code = 0, string[]|null $responseHeaders = [], stdClass|string|null $responseBody = null)

Constructor

Parameters

string $message

Error message

int $code

HTTP status code

string[]|null $responseHeaders

HTTP response header

stdClass|string|null $responseBody

HTTP decoded body of the server response either as \stdClass or string

at line 83
string[]|null getResponseHeaders()

Gets the HTTP response header

Return Value

string[]|null

HTTP response header

at line 93
stdClass|string|null getResponseBody()

Gets the HTTP body of the server response either as Json or string

Return Value

stdClass|string|null

HTTP body of the server response either as \stdClass or string

at line 105
void setResponseObject(mixed $obj)

Sets the deserialized response object (during deserialization)

Parameters

mixed $obj

Deserialized response object

Return Value

void

at line 115
mixed getResponseObject()

Gets the deserialized response object (during deserialization)

Return Value

mixed

the deserialized response object