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

Instantiable
ExtendsGuzzleHttp\Exception\BadResponseException
GuzzleHttp\Exception\RequestException
GuzzleHttp\Exception\TransferException
RuntimeException
Exception
ImplementsGuzzleHttp\Exception\GuzzleException
Throwable
Methods
public GuzzleHttp\Exception\BadResponseException::__construct( $message, Psr\Http\Message\RequestInterface $request, ?Psr\Http\Message\ResponseInterface $response = NULL, ?Exception $previous = NULL, array $handlerContext = [])
public Exception::__toString()
public Exception::__wakeup()
public static GuzzleHttp\Exception\RequestException::create(Psr\Http\Message\RequestInterface $request, ?Psr\Http\Message\ResponseInterface $response = NULL, ?Exception $previous = NULL, array $ctx = [])
 
Factory method to create a new exception with a normalized error message

  • return self
public final Exception::getCode()
public final Exception::getFile()
public GuzzleHttp\Exception\RequestException::getHandlerContext()
 
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.

  • return array
public final Exception::getLine()
public final Exception::getMessage()
public final Exception::getPrevious()
public GuzzleHttp\Exception\RequestException::getRequest()
 
Get the request that caused the exception

  • return RequestInterface
public GuzzleHttp\Exception\RequestException::getResponse()
 
Get the associated response

  • return ResponseInterface|null
public static GuzzleHttp\Exception\RequestException::getResponseBodySummary(Psr\Http\Message\ResponseInterface $response)
 
Get a short summary of the response

Will return null if the response is not printable.

  • return string|null
public final Exception::getTrace()
public final Exception::getTraceAsString()
public GuzzleHttp\Exception\RequestException::hasResponse()
 
Check if a response was received

  • return bool
public static GuzzleHttp\Exception\RequestException::wrapException(Psr\Http\Message\RequestInterface $request, Exception $e)
 
Wrap non-RequestExceptions with a RequestException

Properties
protected Exception::$code
protected Exception::$file
protected Exception::$line
protected Exception::$message
Methods
private final Exception::__clone()
private static GuzzleHttp\Exception\RequestException::obfuscateUri(Psr\Http\Message\UriInterface $uri)
 
Obfuscates URI if there is a username and a password present

  • return UriInterface
Methods
public static GuzzleHttp\Exception\RequestException::create(Psr\Http\Message\RequestInterface $request, ?Psr\Http\Message\ResponseInterface $response = NULL, ?Exception $previous = NULL, array $ctx = [])
 
Factory method to create a new exception with a normalized error message

  • return self
public static GuzzleHttp\Exception\RequestException::getResponseBodySummary(Psr\Http\Message\ResponseInterface $response)
 
Get a short summary of the response

Will return null if the response is not printable.

  • return string|null
private static GuzzleHttp\Exception\RequestException::obfuscateUri(Psr\Http\Message\UriInterface $uri)
 
Obfuscates URI if there is a username and a password present

  • return UriInterface
public static GuzzleHttp\Exception\RequestException::wrapException(Psr\Http\Message\RequestInterface $request, Exception $e)
 
Wrap non-RequestExceptions with a RequestException

© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only