Skip to content

Commit

Permalink
Fix wrong status code check
Browse files Browse the repository at this point in the history
  • Loading branch information
christophrumpel committed Jul 31, 2023
1 parent 17cca57 commit 3251cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Services/Twitter/OAuthTwitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function tweet(string $text): ?array
{
$response = $this->twitter->post('tweets', compact('text'), true);

if ($this->twitter->getLastHttpCode() !== 200) {
if ($this->twitter->getLastHttpCode() > 200) {
throw TwitterException::general($this->twitter->getLastHttpCode(), json_encode($response) ?? $response->title);
}

Expand Down

0 comments on commit 3251cac

Please sign in to comment.