Skip to content

Commit

Permalink
[11.x] Fix/Improve Resend transport response handling - adjusted thro…
Browse files Browse the repository at this point in the history
…w_if condition
  • Loading branch information
markovic-nikola authored Dec 23, 2024
1 parent 0ffe69f commit f31c38e
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 f31c38e

Please sign in to comment.