Last active
June 10, 2019 09:39
-
-
Save szyku/9a344fb9384e413c10b0f6212533ecf7 to your computer and use it in GitHub Desktop.
Better exception names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//.... | |
$action = DocumentSigningAction::create($doc); | |
/** @var \Psr\Http\Message\ResponseInterface $response */ | |
$response = $action->execute(); | |
if ($response->getStatusCode() >= 500) { | |
throw new SigningServiceUnavailable(); | |
} | |
if ($response->getStatusCode() >= 400) { | |
throw new BadSigningRequest(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment