Copied!

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

Instantiable
Extends Exception
RuntimeException
GuzzleHttp\Exception\TransferException
GuzzleHttp\Exception\RequestException
GuzzleHttp\Exception\BadResponseException
Implements GuzzleHttp\Exception\GuzzleException
Psr\Http\Client\ClientExceptionInterface
Psr\Http\Client\RequestExceptionInterface
Throwable
Methods
public GuzzleHttp\Exception\BadResponseException :: __construct ( string $message , Psr\Http\Message\RequestInterface $request , Psr\Http\Message\ResponseInterface $response , ? Throwable $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 , ? Throwable $previous = NULL , array $handlerContext = [ ] , ? GuzzleHttp\BodySummarizerInterface $bodySummarizer = NULL ) : self
 

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

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

public final Exception :: getLine ()
public final Exception :: getMessage ()
public final Exception :: getPrevious ()
public GuzzleHttp\Exception\RequestException :: getRequest () : Psr\Http\Message\RequestInterface
 

Get the request that caused the exception

public GuzzleHttp\Exception\BadResponseException :: getResponse () : Psr\Http\Message\ResponseInterface
 

This function narrows the return type from the parent class and does not allow it to be nullable.

public final Exception :: getTrace ()
public final Exception :: getTraceAsString ()
public GuzzleHttp\Exception\BadResponseException :: hasResponse () : bool
 

Current exception and the ones that extend it will always have a response.

public static GuzzleHttp\Exception\RequestException :: wrapException ( Psr\Http\Message\RequestInterface $request , Throwable $e ) : GuzzleHttp\Exception\RequestException
 

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 ) : Psr\Http\Message\UriInterface
 

Obfuscates URI if there is a username and a password present

Methods
public static GuzzleHttp\Exception\RequestException :: create ( Psr\Http\Message\RequestInterface $request , ? Psr\Http\Message\ResponseInterface $response = NULL , ? Throwable $previous = NULL , array $handlerContext = [ ] , ? GuzzleHttp\BodySummarizerInterface $bodySummarizer = NULL ) : self
 

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

private static GuzzleHttp\Exception\RequestException :: obfuscateUri ( Psr\Http\Message\UriInterface $uri ) : Psr\Http\Message\UriInterface
 

Obfuscates URI if there is a username and a password present

public static GuzzleHttp\Exception\RequestException :: wrapException ( Psr\Http\Message\RequestInterface $request , Throwable $e ) : GuzzleHttp\Exception\RequestException
 

Wrap non-RequestExceptions with a RequestException

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