fix(api): emit 401 on bad credentials during login (#2130)

This commit is contained in:
James Ward
2026-07-27 20:45:44 -04:00
committed by GitHub
parent 068d006dd2
commit 3376d3302f
@@ -44,10 +44,10 @@ public enum ApiError {
CANNOT_DELETE_ADMIN(HttpStatus.FORBIDDEN, "Admin user cannot be deleted"),
FORBIDDEN(HttpStatus.FORBIDDEN, "%s"),
INTERNAL_SERVER_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "%s"),
PASSWORD_INCORRECT(HttpStatus.BAD_REQUEST, "Incorrect current password"),
PASSWORD_INCORRECT(HttpStatus.UNAUTHORIZED, "Incorrect current password"),
PASSWORD_TOO_SHORT(HttpStatus.BAD_REQUEST, "Password must be at least 6 characters long"),
PASSWORD_SAME_AS_CURRENT(HttpStatus.BAD_REQUEST, "New password cannot be the same as the current password"),
INVALID_CREDENTIALS(HttpStatus.BAD_REQUEST, "Invalid credentials"),
INVALID_CREDENTIALS(HttpStatus.UNAUTHORIZED, "Invalid credentials"),
REMOTE_AUTH_DISABLED(HttpStatus.NON_AUTHORITATIVE_INFORMATION, "Remote login is disabled"),
SELF_DELETION_NOT_ALLOWED(HttpStatus.FORBIDDEN, "You cannot delete your own account"),
INVALID_INPUT(HttpStatus.BAD_REQUEST, "%s"),