Skip to content

Commit

Permalink
Merge pull request #7 from doofinder/1690-better-exceptions
Browse files Browse the repository at this point in the history
1690 better exceptions
  • Loading branch information
JoeZ99 committed Sep 25, 2014
2 parents 40d5858 + 0f61021 commit 7f3e100
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/doofinder_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,7 @@ private function apiCall($params){
if (floor($httpCode / 100) == 2) {
return new DoofinderResults($response);
}
if ($httpCode == 429){
// Query limit reached
throw new DoofinderException("Requests Limit Reached");
}
throw new DoofinderException($response);
throw new DoofinderException($httpCode.' - '.$response, $httpCode);
}

/**
Expand Down

0 comments on commit 7f3e100

Please sign in to comment.