From a808671340ed3531fc20a8e2e9cd0a43bfe370c2 Mon Sep 17 00:00:00 2001 From: dead_horse Date: Wed, 20 Jan 2016 11:40:47 +0800 Subject: [PATCH] add app.silent, err.status, err.expose to doc, fixes #630 --- docs/api/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index 6fc2a7b..b149602 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -193,8 +193,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){