class TelegramResponseException extends TelegramSDKException (View source)

Class TelegramResponseException

Methods

__construct( TelegramResponse $response, TelegramSDKException $previousException = null)

Creates a TelegramResponseException.

create( TelegramResponse $response)

A factory for creating the appropriate exception based on the response from Telegram.

int
getHttpStatusCode()

Returns the HTTP status code.

string
getErrorType()

Returns the error type.

string
getRawResponse()

Returns the raw response used to create the exception.

array
getResponseData()

Returns the decoded response used to create the exception.

getResponse()

Returns the response entity used to create the exception.

Details

at line 30
__construct( TelegramResponse $response, TelegramSDKException $previousException = null)

Creates a TelegramResponseException.

Parameters

TelegramResponse $response The response that threw the exception.
TelegramSDKException $previousException The more detailed exception.

at line 48
static TelegramResponseException create( TelegramResponse $response)

A factory for creating the appropriate exception based on the response from Telegram.

Parameters

TelegramResponse $response The response that threw the exception.

Return Value

TelegramResponseException

at line 89
int getHttpStatusCode()

Returns the HTTP status code.

Return Value

int

at line 99
string getErrorType()

Returns the error type.

Return Value

string

at line 109
string getRawResponse()

Returns the raw response used to create the exception.

Return Value

string

at line 119
array getResponseData()

Returns the decoded response used to create the exception.

Return Value

array

at line 129
TelegramResponse getResponse()

Returns the response entity used to create the exception.

Return Value

TelegramResponse