AuthleteApiException extends Exception
Exception that methods of the \Authlete\Api\AuthleteApi interface may throw.
Tags
Table of Contents
- __construct() : mixed
- Constructor.
- getResponseBody() : string
- Get the HTTP response body of a response from an Authlete API.
- getResponseHeaders() : HttpHeaders
- Get the HTTP headers of a response from an Authlete API.
- getStatusCode() : int
- Get the HTTP status code of a response from an Authlete API.
Methods
__construct()
Constructor.
public
__construct(string $message, int $statusCode[, HttpHeaders $responseHeaders = null ][, string $responseBody = null ]) : mixed
Parameters
- $message : string
-
An error message. This argument is passed to the constructor of the parent class. This value is available through
getMessage()
method. - $statusCode : int
-
An HTTP status code. This argument is optional and its default value is 0. This value is available through
getStatusCode()
method. - $responseHeaders : HttpHeaders = null
-
HTTP response headers. This argument is optional and its default value is
null
. This value is available throughgetResponseHeaders()
method. Ifnull
is given, however,getResponseHeader()
will return an emptyHttpHeaders
instance. - $responseBody : string = null
-
An HTTP response body. This argument is optional and its default value is
null
. This value is available throughgetResponseBody()
method.
Tags
Return values
mixed —getResponseBody()
Get the HTTP response body of a response from an Authlete API.
public
getResponseBody() : string
Return values
string —HTTP response body. This may be null
.
getResponseHeaders()
Get the HTTP headers of a response from an Authlete API.
public
getResponseHeaders() : HttpHeaders
Tags
Return values
HttpHeaders —HTTP response headers.
getStatusCode()
Get the HTTP status code of a response from an Authlete API.
public
getStatusCode() : int
Return values
int —HTTP status code. If this exception was thrown before an HTTP status code was read, this method returns 0.