From 7eb955c95a85fe2303a1e2b514a9db3305edebc0 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 22 Nov 2024 18:37:51 +0100 Subject: [PATCH] Refactor Telegram notification error handling --- app/Jobs/SendMessageToTelegramJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/SendMessageToTelegramJob.php b/app/Jobs/SendMessageToTelegramJob.php index 6c581e1d3..85f4fc934 100644 --- a/app/Jobs/SendMessageToTelegramJob.php +++ b/app/Jobs/SendMessageToTelegramJob.php @@ -72,7 +72,7 @@ class SendMessageToTelegramJob implements ShouldBeEncrypted, ShouldQueue } $response = Http::post($url, $payload); if ($response->failed()) { - throw new \Exception('Telegram notification failed with '.$response->status().' status code.'.$response->body()); + throw new \RuntimeException('Telegram notification failed with '.$response->status().' status code.'.$response->body()); } } }