diff --git a/backend/src/main/java/org/booklore/exception/ApiError.java b/backend/src/main/java/org/booklore/exception/ApiError.java index 54d87466f..627dd550e 100644 --- a/backend/src/main/java/org/booklore/exception/ApiError.java +++ b/backend/src/main/java/org/booklore/exception/ApiError.java @@ -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"),