From 0ffef34b74e51ae8508b7f5e1113efe3a98c7023 Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Mon, 7 Oct 2019 23:06:22 -0400 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 515735e4..73e823aa 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Then, register an error handler to report and customize errors ```javascript app.use((err, req, res, next) => { // format error - res.status(err.status).json({ + res.status(err.status || 500).json({ message: err.message, errors: err.errors, });