Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Commit

Permalink
Fix returning of response
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbroberg committed Apr 17, 2018
1 parent f7b4b28 commit b2a3b32
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ private function request($shard, $endpoint)

$statusCode = $response->getStatusCode();

if ($statusCode == 200) {
return $response;
}

if ($statusCode == 404) {
throw new ResourceNotFoundException();
}
Expand All @@ -66,6 +62,8 @@ private function request($shard, $endpoint)
if ($statusCode == 401) {
throw new InvalidAPIKeyException();
}

return $response;
}

/**
Expand Down

0 comments on commit b2a3b32

Please sign in to comment.