From d32623baa7a6273d47be67d587ad4ea0ecffc5de Mon Sep 17 00:00:00 2001 From: urugator Date: Thu, 20 Sep 2018 12:43:23 +0200 Subject: [PATCH] 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 --- docs/error-handling.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/error-handling.md b/docs/error-handling.md index ba4abef..35a8e90 100644 --- a/docs/error-handling.md +++ b/docs/error-handling.md @@ -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.