src/BatchResult.php
public function getExceptionFor(RequestInterface $request): ClientExceptionInterface
    {
        try {
            return $this->exceptions[$request];
        } catch (\UnexpectedValueException $e) {
            throw new \UnexpectedValueException('Request not found', $e->getCode(), $e);
        }
    }
public function getExceptionFor(RequestInterface $request): ClientExceptionInterface
    {
        try {
            return $this->exceptions[$request];
        } catch (\UnexpectedValueException $e) {
            throw new \UnexpectedValueException('Request not found', $e->getCode(), $e);
        }
    }
public function getExceptionFor ( RequestInterface $ request ) : ClientExceptionInterface { try { return $ this -> exceptions [ $ request ] ; } catch ( \ UnexpectedValueException $ e ) { throw new \ UnexpectedValueException ( 'Request not found' , $ e -> getCode ( ) , $ e ) ; } }
Returns the exception for a failed request.


@throws \UnexpectedValueException If request was not part of the batch or was successful
Returns the exception for a failed request .