$request
$request : \Psr\Http\Message\RequestInterface
HTTP Request exception
$request : \Psr\Http\Message\RequestInterface
$response : \Psr\Http\Message\ResponseInterface
__construct( $message, \Psr\Http\Message\RequestInterface $request, \Psr\Http\Message\ResponseInterface $response = null, \Exception $previous = null, array $handlerContext = array())
$message | ||
\Psr\Http\Message\RequestInterface | $request | |
\Psr\Http\Message\ResponseInterface | $response | |
\Exception | $previous | |
array | $handlerContext |
wrapException(\Psr\Http\Message\RequestInterface $request, \Exception $e) : \GuzzleHttp\Exception\RequestException
Wrap non-RequestExceptions with a RequestException
\Psr\Http\Message\RequestInterface | $request | |
\Exception | $e |
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
\Psr\Http\Message\RequestInterface | $request | Request |
\Psr\Http\Message\ResponseInterface | $response | Response received |
\Exception | $previous | Previous exception |
array | $ctx | Optional handler context. |
getResponseBodySummary(\Psr\Http\Message\ResponseInterface $response) : string|null
Get a short summary of the response
Will return null
if the response is not printable.
\Psr\Http\Message\ResponseInterface | $response |
getRequest() : \Psr\Http\Message\RequestInterface
Get the request that caused the exception
getResponse() : \Psr\Http\Message\ResponseInterface|null
Get the associated response
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.
obfuscateUri(\Psr\Http\Message\UriInterface $uri) : \Psr\Http\Message\UriInterface
Obfuscates URI if there is an username and a password present
\Psr\Http\Message\UriInterface | $uri |