From a42e280e490d3ba78e1682db17bdc3b3148c6c2d Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Tue, 17 Dec 2024 10:02:56 -0800 Subject: [PATCH] update comments --- Server/controllers/authController.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/controllers/authController.js b/Server/controllers/authController.js index fb48796df..b7e4a7808 100644 --- a/Server/controllers/authController.js +++ b/Server/controllers/authController.js @@ -281,7 +281,8 @@ const editUser = async (req, res, next) => { const user = await req.db.getUserByEmail(email); // Compare passwords const match = await user.comparePassword(req.body.password); - // If not a match, throw a 401 + // If not a match, throw a 403 + // 403 instead of 401 to avoid triggering axios interceptor if (!match) { const error = new Error(errorMessages.AUTH_INCORRECT_PASSWORD); error.status = 403;