Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use Domains for exception-handling requests #3
Currently, it is the case that if a request is being processed and an error is thrown, the Node process will end; rendering the server unable to accept requests.
The deployment at Nodejitsu restarts the process for the next request. However this is time consuming and not as good as returning a proper "Server Internal Error" message. Also--any exception in one request would take down any requests with pending processing that could have otherwise continued without error.
There didn't seem to be any real way to work around this in the beginning, and I made a note about it. Following up now for the article Handling Internal Errors (and Bad Requests) in Node, I found an answer in response to someone else asking that question:
So long story short is that this problem may well be addressed with a new feature added to Node, called Domains:
Assuming this is the correct methodology for how the top level request exception handling is managed, I should be using it.