Skip to content

Commit

Permalink
Merge pull request #5 from doofinder/exception-query_limit-reached
Browse files Browse the repository at this point in the history
add explicit exception for query_limit_reached
  • Loading branch information
JoeZ99 committed May 30, 2014
2 parents 3c13961 + ae2b7af commit 40d5858
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/doofinder_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ 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);
}

Expand Down

0 comments on commit 40d5858

Please sign in to comment.