Skip to content

[fix] /missions/current 신규 유저 500(USER_LEVEL_NOT_FOUND) 해결#269

Merged
Develop-KIM merged 1 commit into
developfrom
fix/missions-current-init
Jun 30, 2026
Merged

[fix] /missions/current 신규 유저 500(USER_LEVEL_NOT_FOUND) 해결#269
Develop-KIM merged 1 commit into
developfrom
fix/missions-current-init

Conversation

@Develop-KIM

Copy link
Copy Markdown
Member

문제

회고를 한 번도 안 한 유저(신규 온보딩, v1.2.0 배포 후 기존 유저 전원)가 GET /api/v1/missions/current 호출 시 UserLevel 행이 없어 USER_LEVEL_NOT_FOUND500으로 떨어졌습니다. (레벨/미션 데이터가 첫 회고 저장 때만 lazy 생성되기 때문)

수정

  • UserMissionRegister.ensureInitialized(userId) 추가: 레벨 행이 없으면 UserLevel(Lv.1) + Lv.1 미션을 생성(자가 치유, 마이그레이션 불필요)
  • MissionApi.getCurrentMission이 조회 전에 ensureInitialized 호출 → 신규 유저도 Lv.1 미션 카드를 정상 반환
  • 단위 테스트 추가(레벨 없음→생성 / 있음→무동작)

🤖 Generated with Claude Code

회고 전(레벨 행 없는) 유저가 /api/v1/missions/current 호출 시
UserLevelNotFound로 500 나던 문제 수정. ensureInitialized로 UserLevel(Lv.1)+
Lv.1 미션을 자가 생성 후 조회하도록 변경(소급/마이그레이션 불필요).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Develop-KIM Develop-KIM merged commit 59353c5 into develop Jun 30, 2026
1 check passed
@Develop-KIM Develop-KIM deleted the fix/missions-current-init branch June 30, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant