We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
현재 프로젝트에서는 예외 발생 시 일관된 응답 형식이 제공되지 않아 클라이언트가 예외 처리를 일관되게 하기 어렵다. 또한, API 응답 형식이 통일되지 않아 응답 파싱 과정에서 혼선이 발생할 가능성이 있다.
이 이슈에서는 공통 예외 처리 및 공통 응답 객체를 정의하여 일관된 API 응답을 제공하는 것을 목표로 한다.
400 Bad Request
404 Not Found
500 Internal Server Error
ServiceException
ControllerException
ErrorCode
ErrorResponse
ApiResponse
GlobalExceptionHandler
Exception.class
Related to: #이슈번호
The text was updated successfully, but these errors were encountered:
kyeonkim
Successfully merging a pull request may close this issue.
📜 Description
현재 프로젝트에서는 예외 발생 시 일관된 응답 형식이 제공되지 않아 클라이언트가 예외 처리를 일관되게 하기 어렵다.
또한, API 응답 형식이 통일되지 않아 응답 파싱 과정에서 혼선이 발생할 가능성이 있다.
이 이슈에서는 공통 예외 처리 및 공통 응답 객체를 정의하여 일관된 API 응답을 제공하는 것을 목표로 한다.
구현할 기능
🌈 Success criteria
400 Bad Request
,404 Not Found
,500 Internal Server Error
)에서 적절한 HTTP 응답 코드와 메시지를 포함한 응답이 반환된다.👷 To-do
📌 1. 예외 및 응답 설계
ServiceException
,ControllerException
등)를 생성한다.ErrorCode
Enum을 정의하여 예외 유형별 오류 코드와 메시지를 관리한다.ErrorResponse
클래스를 생성하여 공통 에러 응답 포맷을 정의한다.ApiResponse
클래스를 생성하여 정상 응답의 공통 포맷을 정의한다.📌 2. 예외 처리 핸들러 구현
GlobalExceptionHandler
를 생성하여 레이어별 예외(ServiceException
,ControllerException
등)를 처리하도록 한다.Exception.class
)에 대해 기본적인 서버 오류 응답을 반환하도록 처리한다.📌 3. 테스트 코드 작성
📌 4. API 문서화
🔗Related issues
Related to: #이슈번호
The text was updated successfully, but these errors were encountered: