From effec8ce4d7c638c8f0f684861ef33fe11b7e404 Mon Sep 17 00:00:00 2001 From: orenom Date: Sun, 7 Nov 2021 16:53:33 +0100 Subject: [PATCH] set status code to 500 if processing failed --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 2a6a165..a53a8c9 100644 --- a/src/utils.js +++ b/src/utils.js @@ -331,7 +331,7 @@ module.exports = function(redis) { } if(!validLang(lang)) { - return res.send('invalid lang') + return res.status(500).send('invalid lang') } let params = new URLSearchParams(req.query).toString() @@ -399,7 +399,7 @@ module.exports = function(redis) { if(process_html.success === true) { return res.send(applyUserMods(process_html.html.toString(), req.cookies)) } else { - return res.send(process_html.reason) + return res.status(500).send(process_html.reason) } } }