public function addFailure(RequestInterface $request, Exception $exception): void
    {
        $this->lastRequest = $request;
        $this->lastException = $exception;
    }
public function addFailure(RequestInterface $request, Exception $exception): void
    {
        $this->lastRequest = $request;
        $this->lastException = $exception;
    }
public function addFailure ( RequestInterface $ request , Exception $ exception ) : void { $ this -> lastRequest = $ request ; $ this -> lastException = $ exception ; }
Record a failed call.

@param \Psr\Http\Message\RequestInterface $request Request use to make the call
@param \Http\Client\Exception $exception Exception returned by the call
Record a failed call .