fix: Supabase env 누락 시 앱 크래시 대신 토스트 안내#69
Merged
Conversation
- supabase.ts: 모듈 로드 시 throw 제거. env 누락 시 Proxy 기반 lazy client로 호출 시점에만 SupabaseConfigError 발생 - AuthContext: 미설정 환경에서는 세션 조회/구독을 건너뛰어 앱 부팅 보장 - LoginPage/SignupPage: GitHub OAuth 버튼도 try/catch 처리하여 unhandled rejection 방지 - error.ts: SupabaseConfigError 인식 및 사용자 친화적 메시지 반환 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- 7일치 → 5일치(영업일 기준)로 변경 - 가격/등락 데이터 실제 추세 반영
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.
Summary
supabase.ts: 모듈 로드 시 throw 제거. env 누락 시 Proxy 기반 lazy client로 동작 (실제 호출 시점에만SupabaseConfigError발생)AuthContext: 미설정 환경에서는 세션 조회/구독을 건너뛰어 앱 부팅 보장LoginPage/SignupPage: GitHub OAuth 버튼도 try/catch로 감싸 unhandled rejection 방지 (기존엔 async 함수를 onClick에 바로 전달해 실패 시 사용자에게 안내가 없었음)error.ts:SupabaseConfigError인식 → 사용자 친화적 메시지 반환배경
배포 환경에서
index-CXOq1Dac.js:202 Uncaught Error: Supabase 환경변수가 없거나 잘못되었습니다.에러로 앱 전체가 흰 화면이 되는 이슈가 있었습니다. Vercel에 env가 빠져 있던 게 1차 원인이었지만, 그와 별개로 env 누락이 앱 부팅 자체를 막는 구조도 약점이라 함께 정리했습니다.Test plan
🤖 Generated with Claude Code