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}

__serialize()

No description

unserialize($serialized)

{@inheritdoc}

__unserialize(array $data)

No description

getRequest()

Get the request that caused the exception.

ResponseInterface|null
getResponse()

Get the associated response.

hasResponse()

Check if a response was received.

string|null
getRequestId()

No description

Details

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

Exception constructor.

Parameters

RequestException $previous
string $message

at line 61
serialize()

{@inheritdoc}

at line 66
__serialize()

at line 82
unserialize($serialized)

{@inheritdoc}

Parameters

$serialized

at line 88
__unserialize(array $data)

Parameters

array $data

at line 122
getRequest()

Get the request that caused the exception.

at line 132
ResponseInterface|null getResponse()

Get the associated response.

Return Value

ResponseInterface|null

at line 140
hasResponse()

Check if a response was received.

at line 148
string|null getRequestId()

Return Value

string|null