Skip to content

Commit a808671

Browse files
dead-horsejonathanong
authored andcommittedMar 12, 2016
add app.silent, err.status, err.expose to doc, fixes #630
1 parent 53a165f commit a808671

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎docs/api/index.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ app.context.db = db();
193193

194194
## Error Handling
195195

196-
By default outputs all errors to stderr unless __NODE_ENV__ is "test". To perform custom error-handling logic such as centralized logging you
197-
can add an "error" event listener:
196+
By default outputs all errors to stderr unless __NODE_ENV__ is "test" or `app.silent` is `true`.
197+
The default error handler also won't outputs errors when `err.status` is `404` or `err.expose` is `true`.
198+
To perform custom error-handling logic such as centralized logging you can add an "error" event listener:
198199

199200
```js
200201
app.on('error', function(err){

0 commit comments

Comments
 (0)
Please sign in to comment.