But i am not able to register error on sentry if i use patchGlobal command, it works on local errors when i declare it env/production file but if i define it in other places it doesn’t even register local errors.
I also tried integrating it as a middleware but i am not able to integrate it correctly since the link they have provided is for express.
If I had to guess, Sails.js is probably handling errors itself. If it’s built on Express that middleware should work, but otherwise the best I can tell you is “its unsupported right now (because we haven’t even looked at it)”. You might try the issue tracker or other means of communication to find out about registering error handlers. The unfortunate truth is that this core need is often ends up overlooked on the more immature frameworks and platforms.