Skip to content

fix: Google OAuth refresh 에러를 401로 변환하는 방어선 추가#25

Merged
Kimgyuilli merged 6 commits into
mainfrom
fix/google-refresh-error-handling
Apr 17, 2026
Merged

fix: Google OAuth refresh 에러를 401로 변환하는 방어선 추가#25
Kimgyuilli merged 6 commits into
mainfrom
fix/google-refresh-error-handling

Conversation

@Kimgyuilli

Copy link
Copy Markdown
Owner

요약

  • Google OAuth refresh 실패 공통 처리 모듈을 추가하고 dependencies/background worker에 통합
  • Calendar/Gmail 라우터에서 googleapiclient 내부 RefreshError를 401로 변환하는 방어선 추가
  • 관련 회귀 테스트를 보강하고 Phase 25 진행 기록을 문서화

상세 변경

  • backend/app/auth/google_errors.py 신규 추가
  • backend/app/auth/dependencies.py, backend/app/core/background_sync.py 공통 헬퍼 사용으로 정리
  • backend/app/calendar/router.py 5개 엔드포인트에 RefreshError 방어선 추가
  • backend/app/mail/routers/gmail.py 3개 엔드포인트에 RefreshError 방어선 추가
  • backend/tests/routers/test_calendar.py 신규 추가 및 쓰기 경로 회귀 테스트 확장
  • backend/tests/routers/test_gmail.py sync/full, apply-labels까지 회귀 테스트 확장
  • PLAN.md, PROGRESS.md 업데이트

검증

  • cd backend && uv run ruff check .
  • cd backend && uv run pytest ⚠️ 40 passed, 2 failed
  • 기존 무관 실패: tests/routers/test_auth.py sliding session 테스트 2건
    • test_me_renews_cookie_when_token_is_past_half_life
    • test_me_does_not_renew_cookie_when_token_has_enough_time_left

@Kimgyuilli
Kimgyuilli merged commit 0dad5be into main Apr 17, 2026
5 checks passed
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