Skip to content

Commit

Permalink
docs: Update error-handling.md (#1239)
Browse files Browse the repository at this point in the history
Docs incorrectly states that exposed errors are being logged by default error listener:
"which simply log the error if error.expose is true"
https://github.com/koajs/koa/blob/master/lib/application.js#L185
  • Loading branch information
urugator authored and dead-horse committed Sep 20, 2018
1 parent e6853af commit d32623b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ app.use(async (ctx, next) => {
way back through the middleware chain, if an error is caught
and not thrown again, it will not be passed to the error
listener. If no error event listener is specified, then
`app.onerror` will be used, which simply log the error if
`error.expose` is true and `app.silent` is false.
`app.onerror` will be used, which simply log the error unless
`error.expose`is true or `app.silent` is true or `error.status`
is 404.

0 comments on commit d32623b

Please sign in to comment.