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

Feat: 전역 예외처리 응답 로직 구현 #12

Merged
merged 5 commits into from
Jul 5, 2024
Merged

Conversation

loveysuby
Copy link
Contributor

🚀 Related Issue

close: #11

📌 Tasks

  • 모든 예외 응답은 [Feat] Define common api response #6 에서 정의한 공통 응답 형식에 파싱되어 전달됩니다.
  • application 내에서 발생하는 예외는 두 가지로 분류됩니다.
    • 비즈니스 내부에서 발생하는 예외 클래스 (ex : ${domain}_NOT_FOUND, AI_MODEL_UNSPECIFIED)
    • 표준 예외 (로직 내에서 발생하는 표준 예외)
  • 레이어드 아키텍처를 기준으로, 예외 사항은 ErrorType에 추가되고 비즈니스 로직에서 예외를 발생할 때 호출합니다.

📝 Details

  • ApiResponse의 성공|예외 파싱 함수는 출력 형식만을 정의하는 본래 책임을 벗어나므로, ApiResponseFactory로 분리하였습니다.
  • ApiResponseFactorypackage-private으로 보호됩니다.

📚 Remarks

Points or opinions to share teams

@loveysuby loveysuby merged commit 6d77d32 into develop Jul 5, 2024
1 check passed
@loveysuby loveysuby self-assigned this Jul 5, 2024
@loveysuby loveysuby added ♻️ refactor Refactoring code or architecture 🧾 API API feature ✨ feat Improve performance or feature ✅ test Test for add, update, check 🥵 hart labels Jul 5, 2024
@loveysuby loveysuby deleted the feat/11 branch July 5, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 API API feature ✨ feat Improve performance or feature 🥵 hart ♻️ refactor Refactoring code or architecture ✅ test Test for add, update, check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant