Closed
Bug 884342
Opened 11 years ago
Closed 11 years ago
change the app.use error handler to return the correct codes
Categories
(Webmaker Graveyard :: Thimble, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: michiel, Assigned: elnushaj)
Details
Attachments
(1 file)
we should replace all "new Error" errors with soft errors that don't crash the node process. Or change the code so that Error objects don't crash node.
Comment 1•11 years ago
|
||
They shouldn't cause node to crash, just have Express dump an error
this is caused by the error handling in app.js: app.use( function( err, req, res, next) { res.send( 500, err ); }); we need to switch that over to something that checks what the error actually is, and responds appropriately =)
Summary: new Error crashes node → change the app.use error handler to return the correct codes
See https://github.com/mozilla/popcorn.webmaker.org/blob/master/lib/utilities.js#L34-L38 and https://github.com/mozilla/popcorn.webmaker.org/blob/master/server.js#L139-L146
unassigning pending reprioritisation
Assignee: pomax → nobody
Assignee | ||
Comment 5•11 years ago
|
||
I'm willing to give this a go.
Updated•11 years ago
|
Assignee: nobody → enushaj
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•11 years ago
|
||
Could I get a little more detail on what is required for this bug, I.E. what errors I should be checking for and possibly what kind of responses (or the format of the responses) that should result.
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #831021 -
Flags: review?(pomax)
Comment on attachment 831021 [details] [review] https://github.com/mozilla/thimble.webmaker.org/pull/285 r+ if you remove the superfluous comma
Attachment #831021 -
Flags: review?(pomax) → review+
landed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•