Skip to content

Commit d32623b

Browse files
urugatordead-horse
authored andcommitted
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
1 parent e6853af commit d32623b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/error-handling.md

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

0 commit comments

Comments
 (0)