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)

x86
macOS
defect
Not set
major

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.
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
Assignee: nobody → pomax
unassigning pending reprioritisation
Assignee: pomax → nobody
I'm willing to give this a go.
Assignee: nobody → enushaj
Status: NEW → ASSIGNED
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.
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.

Attachment

General

Created:
Updated:
Size: