RequestFailureException
extends RuntimeException
in package
Tags
Table of Contents
- $guzzleException : GuzzleException|null
- fromGuzzleException() : self
- Factory to return a Prismic Exception wrapping a Guzzle Exception
- getRequest() : RequestInterface|null
- Returns the request that caused the exception, if available.
- getResponse() : ResponseInterface|null
- Returns the response that caused the exception, if available.
- fromGuzzleRequestException() : self
- Factory to wrap a Guzzle Request Exception when we should have access to a request and a response.
- fromGuzzleRequestOrConnectException() : self
- Factory to wrap a Guzzle Request or Connect Exception when we should have access to a request and a optionally response
Properties
$guzzleException
protected
GuzzleException|null
$guzzleException
Methods
fromGuzzleException()
Factory to return a Prismic Exception wrapping a Guzzle Exception
public
static fromGuzzleException(GuzzleException $e) : self
Parameters
- $e : GuzzleException
Return values
self —getRequest()
Returns the request that caused the exception, if available.
public
getRequest() : RequestInterface|null
Returns null if the exception does not have a request.
Return values
RequestInterface|null —getResponse()
Returns the response that caused the exception, if available.
public
getResponse() : ResponseInterface|null
Returns null if the exception does not have a response.
Since Guzzle ^7.0 the ConnectException does not have a response, so null is returned.
Return values
ResponseInterface|null —fromGuzzleRequestException()
Factory to wrap a Guzzle Request Exception when we should have access to a request and a response.
protected
static fromGuzzleRequestException(RequestException $e) : self
This function is deprectaed and will be removed in a future release.
Parameters
- $e : RequestException
Tags
Return values
self —fromGuzzleRequestOrConnectException()
Factory to wrap a Guzzle Request or Connect Exception when we should have access to a request and a optionally response
private
static fromGuzzleRequestOrConnectException(RequestException|ConnectException $e) : self
Parameters
- $e : RequestException|ConnectException