ApiException
class ApiException extends Exception (View source)
Represents an exception thrown during an RPC.
Methods
__construct(string $message, int $code, string $status, array $optionalArgs = [])
ApiException constructor.
getStatus()
No description
static ApiException
static ApiException
createFromApiResponse(string $basicMessage, int $rpcCode, array $metadata = null, Exception $previous = null)
No description
static ApiException
createFromRestApiResponse(string $basicMessage, int $rpcCode, array $metadata = null, Exception $previous = null)
For REST-based responses, the metadata does not need to be decoded.
static ApiException
createFromRpcStatus(Status $status)
No description
static ApiException
createFromRequestException(RequestException $ex, bool $isStream = false)
Creates an ApiException from a GuzzleHttp RequestException.
null|string
getBasicMessage()
No description
array
getMetadata()
No description
string
__toString()
String representation of ApiException
Details
__construct(string $message, int $code, string $status, array $optionalArgs = [])
ApiException constructor.
getStatus()
No description
static ApiException
createFromStdClass(stdClass $status)
No description
static ApiException
createFromApiResponse(string $basicMessage, int $rpcCode, array $metadata = null, Exception $previous = null)
No description
static ApiException
createFromRestApiResponse(string $basicMessage, int $rpcCode, array $metadata = null, Exception $previous = null)
For REST-based responses, the metadata does not need to be decoded.
static ApiException
createFromRpcStatus(Status $status)
No description
static ApiException
createFromRequestException(RequestException $ex, bool $isStream = false)
Creates an ApiException from a GuzzleHttp RequestException.
null|string
getBasicMessage()
No description
array
getMetadata()
No description
string
__toString()
String representation of ApiException