Closed emiro85 closed 7 years ago
Will it still set the status to 400 with this change?
No it doesn't set 400 anymore. This is because I couldn't find a place where the status is actually used. If I understood the code right, the execution jumps straight to the error handler in case of this error. From there it returns res.status(500).send "Bad things happened:<br/> #{err.message || err}"
.
Did I miss something?
The alternative would be to handle the error earlier, e.g. instead of return next(err) if err?
do return res.status(400).send err
Btw. is there a typo in resturn
? :https://github.com/acrisci/simple-breakpad-server/blob/616a282da514a84a9deaa69f5686be905518352f/src/app.coffee#L244
Ok let's fix the 400 error later then.
res is not defined in this scope