Merge pull request #232 from altruism/master
Let errors provide their own status.
This commit is contained in:
commit
3cb6c07d5c
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ var proto = module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
var err = msg instanceof Error ? msg : new Error(msg);
|
var err = msg instanceof Error ? msg : new Error(msg);
|
||||||
err.status = status || 500;
|
err.status = status || err.status || 500;
|
||||||
err.expose = err.status < 500;
|
err.expose = err.status < 500;
|
||||||
throw err;
|
throw err;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue