\GuzzleHttp\ExceptionServerException

Exception when a server error is encountered (5xx codes)

Summary

Methods
Properties
Constants
__construct()
wrapException()
create()
getResponseBodySummary()
getRequest()
getResponse()
hasResponse()
getHandlerContext()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
obfuscateUri()
$request
$response
$handlerContext
N/A

Properties

$handlerContext

$handlerContext : array

Type

array

Methods

__construct()

__construct(  $message, \Psr\Http\Message\RequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response = null, \Exception  $previous = null, array  $handlerContext = array()) 

Parameters

$message
\Psr\Http\Message\RequestInterface $request
\Psr\Http\Message\ResponseInterface $response
\Exception $previous
array $handlerContext

create()

create(\Psr\Http\Message\RequestInterface  $request, \Psr\Http\Message\ResponseInterface  $response = null, \Exception  $previous = null, array  $ctx = array()) : self

Factory method to create a new exception with a normalized error message

Parameters

\Psr\Http\Message\RequestInterface $request

Request

\Psr\Http\Message\ResponseInterface $response

Response received

\Exception $previous

Previous exception

array $ctx

Optional handler context.

Returns

self

getResponseBodySummary()

getResponseBodySummary(\Psr\Http\Message\ResponseInterface  $response) : string|null

Get a short summary of the response

Will return null if the response is not printable.

Parameters

\Psr\Http\Message\ResponseInterface $response

Returns

string|null

hasResponse()

hasResponse() : boolean

Check if a response was received

Returns

boolean

getHandlerContext()

getHandlerContext() : array

Get contextual information about the error from the underlying handler.

The contents of this array will vary depending on which handler you are using. It may also be just an empty array. Relying on this data will couple you to a specific handler, but can give more debug information when needed.

Returns

array