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

View File

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