mirror of
https://github.com/Metastem/wikiless
synced 2024-12-06 19:16:58 +01:00
set status code to 500 if processing failed
This commit is contained in:
+2
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user