Skip to content

Commit

Permalink
check the response code is >= 200 && <= 299
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Lockett <gary@creativecow.uk>
  • Loading branch information
Gary Lockett committed Aug 17, 2022
1 parent d3f708a commit 6ac84ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Github/Api/V3/CreateReleaseThroughApiCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __invoke(

$response = $this->client->sendRequest($request);

Psl\invariant($response->getStatusCode() >= 200 || $response->getStatusCode() <= 299, 'Failed to create release through GitHub API.');
Psl\invariant($response->getStatusCode() >= 200 && $response->getStatusCode() <= 299, 'Failed to create release through GitHub API.');

$responseBody = $response
->getBody()
Expand Down

0 comments on commit 6ac84ae

Please sign in to comment.