From 03551c560f78d023c13a95f79f4bb089e04c724f Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Mon, 9 Jul 2018 00:24:36 +0300 Subject: [PATCH] tidy up app.js --- app.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app.js b/app.js index 3688b04..638fa3f 100644 --- a/app.js +++ b/app.js @@ -77,21 +77,18 @@ app.use((error, req, res, next) => { case 'BadRequest': case 'BadRequestError': res.status(400); - res.json({ success: false, error }); break; case 'AuthenticationError': case 'UnauthorizedError': res.status(401); - res.json({ success: false, error }); break; case 'NotFound': res.status(404); - res.json({ success: false, error }); break; default: res.status(500); - res.json({ success: false, error }); } + res.json({ success: false, error }); if ( process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test'