SimpleSoftwareIO\SMS\Drivers\NexmoSMS::handleError PHP Method

handleError() protected method

Log the error message which ocurred
protected handleError ( $body )
$body
    protected function handleError($body)
    {
        $firstMessage = $this->getFirstMessage($body);
        $error = 'An error occurred. Nexmo status code: ' . $firstMessage['status'];
        if ($this->hasProperty($firstMessage, 'error-text')) {
            $error = $firstMessage['error-text'];
        }
        $this->throwNotSentException($error, $firstMessage['status']);
    }