-
Hi, First of all, thanks for this great library. I am planning to use it in production and before I do, I need to figure out how to catch all unhandled errors. For this, Telegraf documentation suggest the following -
On these lines, I do the following in my service:
However, this doesn't seem to work. What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @Dr-Phone, thx! Module already has hardcoded catch: The only thing I can offer at the moment is to import the sources of this module to your project and make it work the way you want it to. OpenSource power 🔥 I will think about how to solve this problem in the next release. I think Exception Filters built-in functionality of will work well for that. And, feel free for make PR. |
Beta Was this translation helpful? Give feedback.
-
Hey @bukhalo, thanks for your quick reply. Exception Filters might actually work. For now, I've littered the code with try-catch blocks everywhere due to the deadline pressure. I guess will have to think about it over the weekend. |
Beta Was this translation helpful? Give feedback.
Hey @Dr-Phone, thx! Module already has hardcoded catch:
https://github.com/bukhalo/nestjs-telegraf/blob/a309d8640d5a46e7a32d1298c9c1548adff7f1cf/lib/telegraf.provider.ts#L24
That's not good, i know)
The only thing I can offer at the moment is to import the sources of this module to your project and make it work the way you want it to. OpenSource power 🔥
I will think about how to solve this problem in the next release. I think Exception Filters built-in functionality of will work well for that.
And, feel free for make PR.