mirror of
https://github.com/Foltik/Shimapan
synced 2025-01-07 08:42:49 -05:00
Change json parse error code to 500
This commit is contained in:
parent
0c12f246d2
commit
c09aaf55ec
@ -20,7 +20,7 @@ router.post('/create', function (req, res) {
|
|||||||
try {
|
try {
|
||||||
scope = JSON.parse(req.body.scope);
|
scope = JSON.parse(req.body.scope);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.status(400).json({'message': e.name + ': ' + e.message});
|
res.status(500).json({'message': e.name + ': ' + e.message});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user