Closed rudyrigot closed 10 years ago
I've looked into this, and there's really not much literature about it out there, and all of it leads me to thing that the error handler seems to be properly positioned already, in the app.js
file as:
// development only
if ('development' == app.get('env')) {
app.use(express.errorHandler());
}
But I don't get:
if
statement, I checked), so there's that too...If anyone has pointers, I'd love it wildly !
I found the cause of the issue, and a solution. It is in the development kit, so here are the explanations.
If whatever error is raised, the server crashes; I don't know enough about node.js/express.js architecture to know if this is the right behavior (and to have the node executable handle errors differently in production, for instance), or if the nehavior should be changed.
I see there is something there, but since it's not in the app yet, I'm not sure this is the right way, I would love more experienced feedback: http://expressjs.com/guide.html#error-handling