Skip to content

Commit

Permalink
add app.silent, err.status, err.expose to doc, fixes koajs#630
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Jan 20, 2016
1 parent fcacb35 commit 8cbff16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit 8cbff16

Please sign in to comment.