laravel-notification-channels / telegram

✈️ Telegram Notifications Channel for Laravel
https://laravel-notification-channels.com/telegram/
MIT License
989 stars 165 forks source link

How do I catch a 400 error exception? #197

Closed liggth closed 1 month ago

liggth commented 4 months ago

I got error: Telegram responded with an error `400 - Bad Request: can't parse entities: Can't find end tag corresponding to start tag "i"

I want to catch this error and send it to my email. How do I catch it?

try { $telegramMessage = TelegramMessage::create()->to($notifiable->routes['telegram'])->content($message)->options(['parse_mode' => $this->parseMode]); } catch (\Throwable $e) { exit(); }

liggth commented 1 week ago

I appreciate the new feature. But I can't use it. Could you publish this change in a new release? When is the new release expected so I can update your package via composer?