|
| __construct (string $message, RequestInterface $request, ResponseInterface $response, Throwable $previous=null, array $handlerContext=[]) |
|
| getHandlerContext () |
| Get contextual information about the error from the underlying handler.
|
|
| getRequest () |
| Get the request that caused the exception.
|
|
| getResponse () |
| This function narrows the return type from the parent class and does not allow it to be nullable.
|
|
| hasResponse () |
| Current exception and the ones that extend it will always have a response.
|
|
◆ __construct()
GuzzleHttp\Exception\BadResponseException::__construct |
( |
string | $message, |
|
|
RequestInterface | $request, |
|
|
ResponseInterface | $response, |
|
|
Throwable | $previous = null, |
|
|
array | $handlerContext = [] ) |
◆ create()
Factory method to create a new exception with a normalized error message.
- Parameters
-
RequestInterface | $request | Request sent |
ResponseInterface | $response | Response received |
Throwable | null | $previous | Previous exception |
array | $handlerContext | Optional handler context |
BodySummarizerInterface | null | $bodySummarizer | Optional body summarizer |
◆ getHandlerContext()
GuzzleHttp\Exception\RequestException::getHandlerContext |
( |
| ) |
|
|
inherited |
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.
◆ getRequest()
GuzzleHttp\Exception\RequestException::getRequest |
( |
| ) |
|
|
inherited |
◆ getResponse()
GuzzleHttp\Exception\BadResponseException::getResponse |
( |
| ) |
|
◆ hasResponse()
GuzzleHttp\Exception\BadResponseException::hasResponse |
( |
| ) |
|
The documentation for this class was generated from the following file:
- lib/guzzlehttp/guzzle/src/Exception/BadResponseException.php