docs: Update error-handling.md (#1239)

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
This commit is contained in:
urugator 2018-09-20 12:43:23 +02:00 committed by Yiyu He
parent e6853af649
commit d32623baa7

View file

@ -56,5 +56,6 @@ app.use(async (ctx, next) => {
way back through the middleware chain, if an error is caught way back through the middleware chain, if an error is caught
and not thrown again, it will not be passed to the error and not thrown again, it will not be passed to the error
listener. If no error event listener is specified, then listener. If no error event listener is specified, then
`app.onerror` will be used, which simply log the error if `app.onerror` will be used, which simply log the error unless
`error.expose` is true and `app.silent` is false. `error.expose`is true or `app.silent` is true or `error.status`
is 404.