Repository navigation
fix: 서버의 "등록된 알람 없음"(URT_001)을 실패가 아닌 정상 상태로 - #375
Merged
Merged
Conversation
refresh가 돌려줄 수 있는 답은 셋인데 둘로 뭉개져 있었다.
- 서버에 세션이 있다 → AlarmInfo
- 서버가 **없다고 답했다** → 404 URT_001 → **throw로 흘렀다** ← 문제
- 못 물어봤다(실패·오프라인) → throw
가운데가 오른쪽과 같은 취급을 받으면서 두 가지가 생겼다. 평상시(알람 미등록)
매 실행마다 "알람 동기화 실패(상태 유지)" 에러 로그가 남았고, 더 나쁘게는
**서버에서 세션이 사라져도 앱이 낡은 세션을 계속 붙들었다** — 다른 기기에서
해제했거나 서버가 정리한 경우, 사용자는 울리지 않을 알람을 믿고 자게 된다.
Domain에 AlarmRefreshOutcome(registered/notRegistered)을 두고 refresh의
반환을 바꿨다. AlarmRepositoryImpl은 responseCode == "URT_001"만
.notRegistered로 매핑하고 나머지는 그대로 throw한다.
Reconciler가 이제 셋을 구분한다:
- server: .registered → 기존 병합 규칙 그대로
- server: .notRegistered → .ended (로컬 기록 정리)
- server: nil → 기존대로 세션 유지 + 로컬 만료만 판정
서버 응답값은 2026-09-25 실측으로 확인했다:
404 {"responseCode":"URT_001","message":"id(1010) 유저가 등록한 경로를 찾을 수 없습니다."}
테스트 +9: Repository 매핑 3(URT_001 / 성공 / 다른 코드는 여전히 throw),
Reconciler 표 4(확정 vs 미조회를 같은 세션으로 대조), UseCase 통과 1,
SyncService 통합 2(.notRegistered는 정리 / 실패는 유지).
검증: 3구성 빌드 + 전 스킴 통과. 시뮬레이터 신규 설치 실행에서
"알람 동기화 실패" 로그 0건 확인(이전에는 매 실행 1건).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or 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
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.
문제
refresh()가 돌려줄 수 있는 답은 셋인데 둘로 뭉개져 있었다.AlarmInfoURT_001가운데가 오른쪽과 같은 취급을 받으면서 두 가지가 생겼다.
알람 동기화 실패(상태 유지)에러 로그서버 실측 (2026-09-25)
CLAUDE.md와 코드에
TODO: [미확정] 서버의 "등록된 알람 없음" 표현이 확정되면…으로 남아 있던 항목의 답이다.변경
Domain에
AlarmRefreshOutcome { registered / notRegistered }를 두고refresh()의 반환을 바꿨다.AlarmRepositoryImpl은URT_001만.notRegistered로 매핑하고 나머지 코드는 그대로 throw한다.AlarmSessionReconciler가 이제 셋을 구분한다 —server: nil이 "못 물어봤다",.notRegistered가 "없다고 답했다"다.테스트 +9
.notRegistered와nil을 각각 넣어 결과가 갈리는 것을 나란히 고정.notRegistered면 스케줄러를 건드리지 않는다.notRegistered는 로컬 정리 / 실패는 세션 유지검증
알람 동기화 실패로그 0건 (이전 매 실행 1건)🤖 Generated with Claude Code