-
-
Save tsh-code/79a78684a54b5ce734f0c270aff4f503 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