From 0c37d3c093b13045e64fada7d26750e2e4a2ea91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gamez?= Date: Wed, 22 May 2024 10:38:45 +0200 Subject: [PATCH] Catch `Throwable` and let the exception converter handle details (#896) --- src/Firebase/Messaging.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Firebase/Messaging.php b/src/Firebase/Messaging.php index 73067eec..67630385 100644 --- a/src/Firebase/Messaging.php +++ b/src/Firebase/Messaging.php @@ -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; @@ -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);