set status code to 500 if processing failed

This commit is contained in:
orenom
2021-11-07 16:53:33 +01:00
parent 3a074a4fa0
commit effec8ce4d
+2 -2
View File
@@ -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)
}
}
}