From b2a3b32315e12cc8902b5d3fb890d63956e3e3df Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 17 Apr 2018 23:13:12 +1000 Subject: [PATCH] Fix returning of response --- src/API.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/API.php b/src/API.php index 9c2e80c..774dae7 100644 --- a/src/API.php +++ b/src/API.php @@ -43,10 +43,6 @@ private function request($shard, $endpoint) $statusCode = $response->getStatusCode(); - if ($statusCode == 200) { - return $response; - } - if ($statusCode == 404) { throw new ResourceNotFoundException(); } @@ -66,6 +62,8 @@ private function request($shard, $endpoint) if ($statusCode == 401) { throw new InvalidAPIKeyException(); } + + return $response; } /**