Skip to content

Commit

Permalink
[chore] change error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kgy1008 committed Jan 7, 2025
1 parent ea4b74b commit 53d574e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.aspectj.lang.annotation.Aspect;
import org.hankki.hankkiserver.api.common.annotation.Retry;
import org.hankki.hankkiserver.common.code.HeartErrorCode;
import org.hankki.hankkiserver.common.exception.ConflictException;
import org.hankki.hankkiserver.common.exception.BadRequestException;
import org.hibernate.StaleObjectStateException;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
Expand All @@ -27,6 +27,6 @@ public Object retryOptimisticLock(final ProceedingJoinPoint joinPoint, final Ret
Thread.sleep(retry.backoff());
}
}
throw new ConflictException(HeartErrorCode.ALREADY_EXISTED_HEART);
throw new BadRequestException(HeartErrorCode.HEART_COUNT_CONCURRENCY_ERROR);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
public enum HeartErrorCode implements ErrorCode {

ALREADY_EXISTED_HEART(HttpStatus.CONFLICT, "이미 좋아요 한 가게입니다."),
ALREADY_NO_HEART(HttpStatus.CONFLICT, "이미 좋아요를 취소한 가게입니다.");
ALREADY_NO_HEART(HttpStatus.CONFLICT, "이미 좋아요를 취소한 가게입니다."),
HEART_COUNT_CONCURRENCY_ERROR(HttpStatus.CONFLICT, "좋아요 처리 중 충돌이 발생했습니다. 잠시 후 다시 시도해주세요.");

private final HttpStatus httpStatus;
private final String message;
Expand Down

0 comments on commit 53d574e

Please sign in to comment.