Reference documentation and code samples for the Google API Core Client class ApiException.
Represents an exception thrown during an RPC.
Namespace
Google \ ApiCoreMethods
__construct
ApiException constructor.
message
string
code
int
status
string|null
optionalArgs
array
{ @type Exception|null $previous @type array|null $metadata @type string|null $basicMessage }
↳ previous
Exception|null
↳ metadata
array|null
↳ basicMessage
string|null
getStatus
getReason
Returns the reason
in ErrorInfo for an exception, or null if there is no ErrorInfo.
string|null
getDomain
Returns the domain
in ErrorInfo for an exception, or null if there is no ErrorInfo.
string|null
getErrorInfoMetadata
Returns the metadata
in ErrorInfo for an exception, or null if there is no ErrorInfo.
array|null
getBasicMessage
null|string
getMetadata
array
__toString
String representation of ApiException
string
static::createFromStdClass
status
stdClass
static::createFromApiResponse
basicMessage
string
rpcCode
int
metadata
array|null
previous
Exception
static::createFromRestApiResponse
For REST-based responses, the metadata does not need to be decoded.
basicMessage
string
rpcCode
int
metadata
array|null
previous
Exception
static::createFromRpcStatus
static::createFromRequestException
Creates an ApiException from a GuzzleHttp RequestException.
ex
GuzzleHttp\Exception\RequestException
isStream
bool