add app.silent, err.status, err.expose to doc, fixes #630
This commit is contained in:
parent
fcacb35220
commit
8cbff160ca
1 changed files with 3 additions and 2 deletions
|
@ -169,8 +169,9 @@ app.context.db = db();
|
|||
|
||||
## Error Handling
|
||||
|
||||
By default outputs all errors to stderr unless __NODE_ENV__ is "test". To perform custom error-handling logic such as centralized logging you
|
||||
can add an "error" event listener:
|
||||
By default outputs all errors to stderr unless __NODE_ENV__ is "test" or `app.silent` is `true`.
|
||||
The default error handler also won't outputs errors when `err.status` is `404` or `err.expose` is `true`.
|
||||
To perform custom error-handling logic such as centralized logging you can add an "error" event listener:
|
||||
|
||||
```js
|
||||
app.on('error', function(err){
|
||||
|
|
Loading…
Reference in a new issue