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

[#117] Refactor: Exception 구조 및 처리 리팩토링 #118

Merged
merged 3 commits into from
Jun 1, 2024

Conversation

tkguswls1106
Copy link
Member

PULL REQUEST

🎋 Branch Name

refactor/#117

🔑 Main Contents

예외처리 클래스의 구분이 명확하지않고 복잡하여 가독성이 떨어졌으며,
또한 ExceptionHandler의 중복 코드를 분리함으로써 최소화하여 전반적인 예외처리 코드의 개선을 하고자 함.

  • CustomException을 상속받는 inner Class 3가지(Exception400,404,500) 클래스 생성
  • 분리되어있었던 기존 예외처리 클래스들을 위의 inner Class 내부에 기재
  • errorStatus & errorMessage -> errorResponseCode 로 치환하여 한번에 관리
  • 이를 통한 ExceptionHandler의 중복 코드를 분리 제거 및 가독성 향상

🏞 Screenshots (Optional)

image

📋 Checks for reviewers (Optional)

리팩토링 이후, 위의 스크린샷에서 보시다시피 inner Class 형식으로써 예외처리 코드 구조가 보다 더 깔끔해지고 용이해졌습니다.

@tkguswls1106 tkguswls1106 added the ♻️ Refactor 코드 리팩토링 label Jun 1, 2024
@tkguswls1106 tkguswls1106 requested a review from JunSang1121 June 1, 2024 02:41
@tkguswls1106 tkguswls1106 self-assigned this Jun 1, 2024
@tkguswls1106 tkguswls1106 linked an issue Jun 1, 2024 that may be closed by this pull request
Copy link
Collaborator

@JunSang1121 JunSang1121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다. 승인합니다

@tkguswls1106 tkguswls1106 merged commit ccbb3fc into develop Jun 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ Refactor 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor] Exception 구조 및 처리 리팩토링
2 participants