Skip to content

Commit

Permalink
Merge pull request #1 from hove-io/BO_4159_throw_exception_
Browse files Browse the repository at this point in the history
Refs #BO-4159 - This PR add throw if we have error wih twitter api
  • Loading branch information
CedricPatat authored Jan 31, 2025
2 parents bd87881 + 373bf18 commit 8b0acc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TwitterOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ private function makeRequests(
// Retry up to our $maxRetries number if we get errors greater than 500 (over capacity etc)
} while ($this->requestsAvailable());

if (isset($response->status) && $response->status != 200) {
throw new TwitterOAuthException($result);
}

return $response;
}

Expand Down

0 comments on commit 8b0acc5

Please sign in to comment.