Merge pull request #232 from altruism/master

Let errors provide their own status.
master
Jonathan Ong 2014-03-06 20:08:00 -08:00
commit 3cb6c07d5c
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ var proto = module.exports = {
}
var err = msg instanceof Error ? msg : new Error(msg);
err.status = status || 500;
err.status = status || err.status || 500;
err.expose = err.status < 500;
throw err;
},