\GuzzleHttp\Command\ExceptionCommandClientException

Exception encountered when a 4xx level response is received for a request

Summary

Methods
Properties
Constants
fromPrevious()
__construct()
getCommand()
getRequest()
getResponse()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$command
$request
$response
N/A

Properties

$command

$command : \GuzzleHttp\Command\CommandInterface

Type

CommandInterface

$request

$request : \Psr\Http\Message\RequestInterface

Type

RequestInterface

$response

$response : \Psr\Http\Message\ResponseInterface

Type

ResponseInterface

Methods

fromPrevious()

fromPrevious(\GuzzleHttp\Command\CommandInterface  $command, \Exception  $prev) : \GuzzleHttp\Command\Exception\CommandException

Parameters

\GuzzleHttp\Command\CommandInterface $command
\Exception $prev

Returns

\GuzzleHttp\Command\Exception\CommandException —

__construct()

__construct(string  $message, \GuzzleHttp\Command\CommandInterface  $command, \Exception  $previous = null, \Psr\Http\Message\RequestInterface  $request = null, \Psr\Http\Message\ResponseInterface  $response = null) : mixed

Parameters

string $message

Exception message

\GuzzleHttp\Command\CommandInterface $command
\Exception $previous

Previous exception (if any)

\Psr\Http\Message\RequestInterface $request
\Psr\Http\Message\ResponseInterface $response

Returns

mixed —

getCommand()

getCommand() : \GuzzleHttp\Command\CommandInterface

Gets the command that failed.

Returns

\GuzzleHttp\Command\CommandInterface —

getRequest()

getRequest() : \Psr\Http\Message\RequestInterface|null

Gets the request that caused the exception

Returns

\Psr\Http\Message\RequestInterface|null —

getResponse()

getResponse() : \Psr\Http\Message\ResponseInterface|null

Gets the associated response

Returns

\Psr\Http\Message\ResponseInterface|null —