You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The complexity I see here is that while we can capture unhandled exceptions in a domain, responding back to the client and beginning a graceful shutdown, an unhandled rejection will not be caught in the domain. Therefore adding a process.on('unhandledRejection') isn't going to be super useful from a general usage perspective.
From experimentation I've seen that adding an unhandledRejection listener which emits SIGTERM will allow the server to drain traffic and shutdown gracefully.
We currently have an
uncaughtException
handler of sorts in, https://github.com/krakenjs/kraken-js/blob/v2.x/middleware/shutdown.jsWould it be possibly to add a similar
unhandledException
handler? Would we want to do that here.Now that promises are baked into node, I'm sure we'll see these being used more often.
The text was updated successfully, but these errors were encountered: