Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] 경매 구매 요청 시 경매 재고가 부족하다면 200응답을 주도록 변경한다. #317

Closed
2 tasks done
Tracked by #308
HiiWee opened this issue Aug 27, 2024 · 0 comments · Fixed by #321
Closed
2 tasks done
Tracked by #308
Assignees
Labels
REFACTOR 코드 개선

Comments

@HiiWee
Copy link
Member

HiiWee commented Aug 27, 2024

✨ Describe

  • 현재는 경매 재고가 부족하면 다음과 같이 예외를 발생시키고 있습니다.
    스크린샷 2024-08-27 오후 2 08 19
  • 비즈니스적으로 생각했을때 재고가 부족했을때 구매 요청을 보내는것도 정상적인 흐름이므로 이를 200응답을 주도록 변경하려 합니다.

현재는 커스텀 예외를 만들어서 ControllerAdvice에서 해당 예외만을 별도로 처리하려 합니다.

✅ Todo

  • 현재 BadRequestException 예외를 별도의 커스텀 예외로 분리한다.
    • 커스텀 예외에는 메시지와 에러코드만 담기는데, 에러 코드에서 재고 부족으로 인해 전달된 메시지라는걸 구분할 수 있는 코드를 가지고 있습니다.

🙋🏻 More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REFACTOR 코드 개선
Projects
None yet
1 participant