-
Notifications
You must be signed in to change notification settings - Fork 9
looks like event router:request:500 doesn't work #2
Comments
@gvlekke PR welcome, I no longer use sails.js and no time to support this hook |
the reason is simple, https://github.com/balderdashy/sails/blob/master/lib/EVENTS.md#routerrequest500 states that:
Because sails doesnt use error handling middleware in the same way that express works, instead using custom error response commands like res.badRequest, the event is only triggered in a case where the normal sails error responses dont trigger. I'm not a big fan of how sails.js handles this, but I think instead of hooking into the event listener, you should add the sentry hook in the response handlers |
There three types of errors we need to log with sentry:
pr #3 |
@Freundschaft @gvlekke please test the latest beta version |
I added sails-hook-sentry to my project and after that it works fine with the captureException method.
in the script https://github.com/listepo/sails-hook-sentry/blob/master/index.js#L40
there is a event is called when you see a 500 page.
In my project it isn't called...
my questions:
The text was updated successfully, but these errors were encountered: