Skip to content

Commit

Permalink
Catch Throwable and let the exception converter handle details (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegamez committed May 22, 2024
1 parent fa16ab9 commit 0c37d3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Firebase/Messaging.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Kreait\Firebase;

use Beste\Json;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Promise\Utils;
use Kreait\Firebase\Exception\InvalidArgumentException;
use Kreait\Firebase\Exception\Messaging\InvalidArgument;
Expand Down Expand Up @@ -97,7 +96,7 @@ public function sendAll($messages, bool $validateOnly = false): MulticastSendRep

$sendReports[$index] = SendReport::success($message->target(), $json, $message);
},
'rejected' => function (RequestException $reason, int $index) use ($messages, &$sendReports) {
'rejected' => function (Throwable $reason, int $index) use ($messages, &$sendReports) {
$message = $messages[$index];

$error = $this->exceptionConverter->convertException($reason);
Expand Down

0 comments on commit 0c37d3c

Please sign in to comment.