src/Amadeus/Client/ResponseHandler/Base.php
public function analyzeResponse($sendResult, $messageName)
    {
        if (!empty($sendResult->exception)) {
            return $this->makeResultForException($sendResult);
        }

        $handler = $this->findHandlerForMessage($messageName);

        if ($handler instanceof MessageResponseHandler) {
            return $handler->analyze($sendResult);
        } else {
            return new Result($sendResult, Result::STATUS_UNKNOWN);
        }
    }
public function analyzeResponse($sendResult, $messageName)
    {
        if (!empty($sendResult->exception)) {
            return $this->makeResultForException($sendResult);
        }

        $handler = $this->findHandlerForMessage($messageName);

        if ($handler instanceof MessageResponseHandler) {
            return $handler->analyze($sendResult);
        } else {
            return new Result($sendResult, Result::STATUS_UNKNOWN);
        }
    }
Analyze the response from the server and throw an exception when an error has been detected.

@param SendResult $sendResult The Send Result from the Session Handler
@param string $messageName The message that was called

@throws Exception
@throws \RuntimeException
@return Result