Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Stay Calm template for user testing, minor fix to node error handling #638

Merged
merged 1 commit into from
Jun 30, 2015

Conversation

humphd
Copy link
Contributor

@humphd humphd commented Jun 30, 2015

I've also slipped in a minor fix to the error handling middleware we use, which was wrong before.

This temporarily overrides how we do the default project content so @flukeout can do user testing, see https://github.com/mozilla/thimble.webmaker.org/issues/558#issuecomment-117259560

@@ -14,7 +14,7 @@ function renderError( err, res ) {
});
}

module.exports.errorHandler = function(err, req, res) {
module.exports.errorHandler = function(err, req, res, next) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we pass in next if we're not calling it anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs 4-args vs. 3 in order for express to treat it as error handling middleware, see http://expressjs.com/guide/error-handling.html

@gideonthomas
Copy link
Contributor

r=me with travis

@humphd humphd merged commit 415042d into mozilla:bramble Jun 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants