class Exception extends RuntimeException implements Serializable

An Exception is thrown when an errors occurs while communicating with the API.

Methods

__construct(RequestException $previous, string $message = '')

Exception constructor.

serialize()

{@inheritdoc}

unserialize($serialized)

{@inheritdoc}

RequestInterface
getRequest()

Get the request that caused the exception.

ResponseInterface|null
getResponse()

Get the associated response.

bool
hasResponse()

Check if a response was received.

string|null
getRequestId()

No description

Details

at line 53
__construct(RequestException $previous, string $message = '')

Exception constructor.

Parameters

RequestException $previous
string $message

at line 73
serialize()

{@inheritdoc}

at line 89
unserialize($serialized)

{@inheritdoc}

Parameters

$serialized

at line 133
RequestInterface getRequest()

Get the request that caused the exception.

Return Value

RequestInterface

at line 143
ResponseInterface|null getResponse()

Get the associated response.

Return Value

ResponseInterface|null

at line 153
bool hasResponse()

Check if a response was received.

Return Value

bool

at line 161
string|null getRequestId()

Return Value

string|null