Skip to content

Commit

Permalink
Merge pull request #3 from talkinnl/patch-2
Browse files Browse the repository at this point in the history
Include status code in SignhostException message
  • Loading branch information
steffjenl authored Aug 31, 2018
2 parents 38b410b + aa6ea84 commit cce5360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SignhostClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ private function checkHTTPStatusCode($statusCode, $response)
if (!empty($object->Message)) {
$message = $object->Message;
}
throw new SignhostException("Signhost reports:" . $message);
throw new SignhostException("Signhost reports: " . $statusCode . " - " . $message, $statusCode);
} else if ($firstChar == '5') {
throw new SignhostException("Signhost reports:" . "Internal Server Error on signhost server.");
throw new SignhostException("Signhost reports: " . $statusCode . " - Internal Server Error on signhost server.", $statusCode);
}

return false;
Expand All @@ -243,4 +243,4 @@ private function calculateFileChecsum($filePath)
{
return base64_encode(pack('H*', hash_file('sha256', $filePath)));
}
}
}

0 comments on commit cce5360

Please sign in to comment.