Return 401 instead of 400 on bad login

Resolves #276
This commit is contained in:
Owen 2025-03-04 20:32:48 -05:00
parent cc6800c791
commit 654ed46a46
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD

View file

@ -78,7 +78,7 @@ export async function login(
}
return next(
createHttpError(
HttpCode.BAD_REQUEST,
HttpCode.UNAUTHORIZED,
"Username or password is incorrect"
)
);
@ -98,7 +98,7 @@ export async function login(
}
return next(
createHttpError(
HttpCode.BAD_REQUEST,
HttpCode.UNAUTHORIZED,
"Username or password is incorrect"
)
);
@ -129,7 +129,7 @@ export async function login(
}
return next(
createHttpError(
HttpCode.BAD_REQUEST,
HttpCode.UNAUTHORIZED,
"The two-factor code you entered is incorrect"
)
);