You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a large userbase and they link their profile to my api via a chatbot that identifies their chat_id and stores it.
Some users block the bot instead of unsubscribing, which is fine, but I don't know how to catch the chat_id from the resulting 403 Exception:
Telegram responded with an error 403 - Forbidden: user is deactivated {"exception":"[object] (NotificationChannels\Telegram\Exceptions\CouldNotSendNotification(code: 0): Telegram responded with an error 403 - Forbidden: user is deactivated
The resulting Guzzle Exception does not provide more info...
My logs get flooded and I'm wondering if there is a way to catch this and remove the chat_id from the respective notifiable instance?
I have around 100 different Notification Classes and i'd like to avoid putting a log:debug in every each of them to identify the model.
My workaround would be extending the notification channel and catch the client exception, but i'm wondering if this is the way...
Thank you very much
The text was updated successfully, but these errors were encountered:
You can listen to the NotificationFailed event which gets dispatched with appropriate data in TelegramChannel. This should be the ideal way if you have multiple notifications.
You can also use the onError(Closure) method to catch the exception in the notification itself from the next version.
Hello from Germany,
I have a large userbase and they link their profile to my api via a chatbot that identifies their chat_id and stores it.
Some users block the bot instead of unsubscribing, which is fine, but I don't know how to catch the chat_id from the resulting 403 Exception:
Telegram responded with an error
403 - Forbidden: user is deactivated
{"exception":"[object] (NotificationChannels\Telegram\Exceptions\CouldNotSendNotification(code: 0): Telegram responded with an error403 - Forbidden: user is deactivated
The resulting Guzzle Exception does not provide more info...
My logs get flooded and I'm wondering if there is a way to catch this and remove the chat_id from the respective notifiable instance?
I have around 100 different Notification Classes and i'd like to avoid putting a log:debug in every each of them to identify the model.
My workaround would be extending the notification channel and catch the client exception, but i'm wondering if this is the way...
Thank you very much
The text was updated successfully, but these errors were encountered: