-
Notifications
You must be signed in to change notification settings - Fork 1
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] 탐색 API ErrorStatus 설정 #95
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yyypearl
approved these changes
Jan 2, 2025
|
yyypearl
reviewed
Jan 2, 2025
Comment on lines
47
to
51
} else if (sort.equals("oldest")) { | ||
travels = travelRepository.findByCityIdInAndTravelOpenTrueOrderByCreatedAtAsc(new ArrayList<>(cityIds)); | ||
} else { | ||
throw new IllegalArgumentException("파라미터 값이 잘못 되었습니다."); | ||
throw new BadRequestHandler(ErrorStatus.INVALID_TRAVEL_PARARM); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
따라서 이러한 요청 파라미터 유효성 검사는 controller
에서 처리하는 것이 더 적합할 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵! 수정해서 반영하겠습니다! 감사합니다 :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
연관 이슈
#92
개요
탐색 API ErrorStatus 설정, 요즘 떠오르는 도시 개수 제한
✅ 작업 내용
📝 논의사항
ErrorStatus 처리 방법과 관련해서 궁금한 사항이 있는데요.. pr [refactor] 여행기 조각 정렬 및 프로필 수정 API 리팩토링 #86 참고했는데, 결국 handler를 사용하기로 된건가요? 우선 [refactor] 여행기 조각 정렬 및 프로필 수정 API 리팩토링 #86 처럼 적용하긴 했습니다! 또.. 저는 해당 pr 이후, 다음 작업은 데모데이 이전에 제가 작업했던 api 모두 Error 처리를 지금과 같이 통일해놓으려고 하는데, 아직 대부분의 controller를 보면 처리가 되어있지 않은 것 같아서요.. 이대로 계속 작업해도 될지 모르겠네요ㅜㅜ(추가적으로, Error처리 관련 로직을 controller에서 하면 좋을지, service에서 하면 좋을지도..)
이건 제가 해결하지 못 한 문제인데요. pr [feature] 탐색 화면 - 도시, 국가 검색 api 구현 #84 까지만 해도 검색 시, 입력이 "서울과 도쿄 여행기" 이런식으로 복잡한 입력이 주어져도 처리가 가능했었는데, 최신순/오래된순 기능 추가하면서 갑자기 저 로직이 돌아가지 않아서요 ㅜㅜ 이런 저런 로직으로 계속 수정해도 안 되어서 혹시 좋은 아이디어 있으면 공유 부탁드립니다..