Documentation

JsonQueryExceptionParser extends AbstractJsonExceptionParser
in package

Parses JSON encoded exception responses from query services

Table of Contents

Methods

parse()  : array<string|int, mixed>
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)
doParse()  : array<string|int, mixed>
Pull relevant exception data out of the parsed json

Methods

parse()

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)

public parse(RequestInterface $request, Response $response) : array<string|int, mixed>
Parameters
$request : RequestInterface
$response : Response

Unsuccessful response

Return values
array<string|int, mixed>

doParse()

Pull relevant exception data out of the parsed json

protected doParse(array<string|int, mixed> $data, Response $response) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

The exception data

$response : Response

The response from the service containing the error

Return values
array<string|int, mixed>

        
On this page

Search results