From 3e17b738316e5b07641874d97e68ec97b8a5473c Mon Sep 17 00:00:00 2001 From: Leandro Menezes Date: Mon, 16 Dec 2024 20:23:38 -0300 Subject: [PATCH] Error 500 when password invalid --- src/app-openid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app-openid.js b/src/app-openid.js index 931484074..487c268b8 100644 --- a/src/app-openid.js +++ b/src/app-openid.js @@ -49,7 +49,7 @@ app.post('/disable', validateSessionMiddleware, async (req, res) => { let { error } = (await disableOpenID(req.body)) || {}; if (error) { - res.status(500).send({ status: 'error', reason: error }); + res.status(401).send({ status: 'error', reason: error }); return; } res.send({ status: 'ok' });