Skip to content

Commit

Permalink
11.x improve resend transport response handling - fix (#54006)
Browse files Browse the repository at this point in the history
* [11.x] Improve Resend transport response handling

* [11.x] Fix/Improve Resend transport response handling - adjusted throw_if condition
  • Loading branch information
markovic-nikola authored Dec 26, 2024
1 parent a401108 commit 6c9e29f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Mail/Transport/ResendTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function doSend(SentMessage $message): void
'attachments' => $attachments,
]);

throw_if($result['statusCode'] != Response::HTTP_OK, Exception::class, $result['message']);
throw_if(isset($result['statusCode']) && $result['statusCode'] != Response::HTTP_OK, Exception::class, $result['message']);
} catch (Exception $exception) {
throw new TransportException(
sprintf('Request to Resend API failed. Reason: %s.', $exception->getMessage()),
Expand Down

0 comments on commit 6c9e29f

Please sign in to comment.