-
Notifications
You must be signed in to change notification settings - Fork 2
MOSU-358 refactor: 아이디 찾기 휴대폰 번호 비교 시 U Prefix 추가 #359
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,7 @@ public enum ErrorCode { | |
|
|
||
| // ID 찾기 관련 | ||
| NOT_FOUND_LOGIN_ID(HttpStatus.NOT_FOUND, "해당 아이디를 찾을 수 없습니다.", CriticalLevel.LOW), | ||
| KAKAO_ACCOUNT_DUPLICATED(HttpStatus.CONFLICT, "카카오로 가입한 사용자입니다", CriticalLevel.LOW), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAdd test coverage for FindLoginId Kakao-joined path Since this code is used in the Find ID flow, add a service-layer test that:
Also add a negative test asserting non-Kakao users return loginId, and a “not found” path still throws You can locate usages and missing tests with: 🏁 Script executed: #!/bin/bash
# Find new error usage sites
rg -n "KAKAO_ACCOUNT_DUPLICATED"
# Sanity-check FindLoginId flow and phone formatting
rg -n -C3 "find(Login)?Id|findByNameAndPhoneNumber|formatPhoneNumber"
# Locate exception mapping to HTTP responses (ControllerAdvice)
rg -n -C2 "CustomRuntimeException|@ExceptionHandler|ErrorCode\."Length of output: 154354 🏁 Script executed: #!/bin/bash
# Search for service-layer tests covering the FindLoginId flow in MyUserService
rg -n 'findLoginId' -g 'src/test/java/**'
rg -n 'MyUserService' -g 'src/test/java/**'
rg -n 'ErrorCode.KAKAO_ACCOUNT_DUPLICATED' -g 'src/test/java/**'Length of output: 150 Add missing unit tests for The service-layer behavior for
Use Mockito (or your preferred mocking framework) to stub 🤖 Prompt for AI Agents |
||
|
|
||
| //결제 API 실패 | ||
| PAYMENT_API_ERROR(HttpStatus.BAD_REQUEST, "결제 API 호출에 실패하였습니다.", CriticalLevel.CRITICAL), | ||
|
|
||
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.
휴대폰 번호 형식(하이픈 포함/미포함)에 관계없이 일관된 조회를 위해, 조회 전 휴대폰 번호를 정규화하는 것이 좋습니다. 예를 들어,
request.phoneNumber()에서 하이픈을 제거한 후formatPhoneNumber를 호출하면 사용자가 어떤 형식으로 번호를 입력하더라도 동일한 결과로 조회할 수 있습니다.UserJpaEntity에getPhoneNumberWithoutHyphen()메서드가 있는 것으로 보아, 데이터베이스에 하이픈이 포함된 휴대폰 번호가 저장될 수 있는 것 같습니다. 이 제안은 데이터베이스에 저장된 번호가 하이픈이 없는 숫자 형식으로 통일되어 있다는 가정 하에 유효합니다. 만약 하이픈이 포함된 형식으로 저장된다면, 정규화 방식에 대한 추가적인 논의가 필요해 보입니다.