Class ErrorResponsePlugin
Converts generic Guzzle response exceptions into errorResponse exceptions
- Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Namespace: Guzzle\Plugin\ErrorResponse
Located at Guzzle/Plugin/ErrorResponse/ErrorResponsePlugin.php
Located at Guzzle/Plugin/ErrorResponse/ErrorResponsePlugin.php
Methods summary
-
public static
getSubscribedEvents ( )
-
public
onCommandBeforeSend ( Guzzle\Common\Event $event )
Adds a listener to requests before they sent from a command
-
protected
getErrorClosure ( Guzzle\Http\Message\RequestInterface $request, Guzzle\Service\Command\CommandInterface $command, Guzzle\Service\Description\Operation $operation )
Methods detail
Adds a listener to requests before they sent from a command
Parameters
- $event
Guzzle\Common\Event
$event Event emitted
#
protected
Closure
getErrorClosure( Guzzle\Http\Message\RequestInterface
$request, Guzzle\Service\Command\CommandInterface
$command, Guzzle\Service\Description\Operation
$operation )
Parameters
- $request
Guzzle\Http\Message\RequestInterface
$request Request that received an error- $command
Guzzle\Service\Command\CommandInterface
$command Command that created the request- $operation
Guzzle\Service\Description\Operation
$operation Operation that defines the request and errors