If you run a bot in polling mode over a longer period of time you can run into many different errors like timeouts and some async/promise problems in bluebird.
My main problem is the error handling. As far as I can see there is no proper solution included in this API. So how do you guys handle and/or catch errors so that the bot doesn鈥檛 crash after a few hrs?
Just noticed this as well. Apparently, any exceptions thrown in a message event handler will be silently suppressed.
You can use Forever libraries, so that if your Code throws errors and timeout's then it will restart your bot server.
Watch PR #180 for a possible fix on this issue.
However, your application will not crash on such unhandled exceptions during polling. An error will be logged to your console. What would be your approach in handling such errors?
Proper Error Handling is on our TODO list.
We need to:
Related issues:
Proper Error Handling has been added in v0.27.0. Please see the documentation on error handling.
Thanks @panp858, @PandaWhisperer, @kryptome, @roccomuso and @GermanBluefox for your time, effort and patience while we worked on this feature. :tada:
thanks @GochoMugo !
Most helpful comment
Proper Error Handling has been added in v0.27.0. Please see the documentation on error handling.
Thanks @panp858, @PandaWhisperer, @kryptome, @roccomuso and @GermanBluefox for your time, effort and patience while we worked on this feature. :tada: