Class AbstractJsonExceptionParser
Parses JSON encoded exception responses
- Aws\Common\Exception\Parser\AbstractJsonExceptionParser implements Aws\Common\Exception\Parser\ExceptionParserInterface
Direct known subclasses
Aws\Common\Exception\Parser\JsonQueryExceptionParser
,
Aws\Common\Exception\Parser\JsonRestExceptionParser
Abstract
Namespace: Aws\Common\Exception\Parser
Located at Aws/Common/Exception/Parser/AbstractJsonExceptionParser.php
Namespace: Aws\Common\Exception\Parser
Located at Aws/Common/Exception/Parser/AbstractJsonExceptionParser.php
Methods summary
-
public
parse ( Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\Response $response )
Parses an exception into an array of data containing at minimum the following array keys:
- type: Exception type
- code: Exception code
- message: Exception message
- request_id: Request ID
- parsed: The parsed representation of the data (array, SimpleXMLElement, etc)
-
abstract protected
doParse ( array $data, Guzzle\Http\Message\Response $response )
Pull relevant exception data out of the parsed json
Methods detail
#
public
array
parse( Guzzle\Http\Message\RequestInterface
$request, Guzzle\Http\Message\Response
$response )
Parses an exception into an array of data containing at minimum the following array keys:
- type: Exception type
- code: Exception code
- message: Exception message
- request_id: Request ID
- parsed: The parsed representation of the data (array, SimpleXMLElement, etc)
Parameters
- $request
Guzzle\Http\Message\RequestInterface
$request- $response
Guzzle\Http\Message\Response
$response Unsuccessful response
Returns
array
Implementation of
Pull relevant exception data out of the parsed json
Parameters
- $data
array
$data The exception data- $response
Guzzle\Http\Message\Response
$response The response from the service containing the error
Returns
array