Closed eedea closed 4 months ago
Do you use express v4? It does not support promises yet, so if your grammY middleware rejects, express does not catch it. You need to wrap it inside a custom error handler and convert the error to the express callbacks. My personal suggestion is to either ditch express entirely, or use grammY error boundaries so you can catch errors before they even reach express.
Closing due to inactivity
I have a bot working in webhook mode and I want to use express for error handling I have written a simple middleware for it but it looks like it doesn't receive error from bot since it throw error in bot and the app crashes. Is there anything I have to do in bot section of code?