-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebaseError.ts
More file actions
125 lines (124 loc) ยท 8.35 KB
/
firebaseError.ts
File metadata and controls
125 lines (124 loc) ยท 8.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
export type FirebaseErrorCode =
| string
| 'auth/claims-too-large'
| 'auth/email-already-exists'
| 'auth/id-token-expired'
| 'auth/id-token-revoked'
| 'auth/insufficient-permission'
| 'auth/internal-error'
| 'auth/invalid-argument'
| 'auth/invalid-claims'
| 'auth/invalid-continue-uri'
| 'auth/invalid-creation-time'
| 'auth/invalid-credential'
| 'auth/invalid-disabled-field'
| 'auth/invalid-display-name'
| 'auth/invalid-dynamic-link-domain'
| 'auth/invalid-email'
| 'auth/wrong-password'
| 'auth/invalid-email-verified'
| 'auth/invalid-hash-algorithm'
| 'auth/invalid-hash-block-size'
| 'auth/invalid-hash-derived-key-length'
| 'auth/invalid-hash-key'
| 'auth/invalid-hash-memory-cost'
| 'auth/invalid-hash-parallelization'
| 'auth/invalid-hash-rounds'
| 'auth/invalid-hash-salt-separator'
| 'auth/invalid-id-token'
| 'auth/invalid-last-sign-in-time'
| 'auth/invalid-page-token'
| 'auth/invalid-password'
| 'auth/invalid-password-hash'
| 'auth/invalid-password-salt'
| 'auth/invalid-phone-number'
| 'auth/invalid-photo-url'
| 'auth/invalid-provider-data'
| 'auth/invalid-provider-id'
| 'auth/invalid-oauth-responsetype'
| 'auth/invalid-session-cookie-duration'
| 'auth/invalid-uid'
| 'auth/invalid-user-import'
| 'auth/maximum-user-count-exceeded'
| 'auth/missing-android-pkg-name'
| 'auth/missing-continue-uri'
| 'auth/missing-hash-algorithm'
| 'auth/missing-ios-bundle-id'
| 'auth/missing-uid'
| 'auth/missing-oauth-client-secret'
| 'auth/operation-not-allowed'
| 'auth/phone-number-already-exists'
| 'auth/project-not-found'
| 'auth/reserved-claims'
| 'auth/session-cookie-expired'
| 'auth/session-cookie-revoked'
| 'auth/uid-already-exists'
| 'auth/unauthorized-continue-uri'
| 'auth/user-not-found';
export const CustomFirebaseError: Record<FirebaseErrorCode, string> = {
'auth/claims-too-large':
'setCustomUserClaims()์ ์ ๊ณต๋ ํด๋ ์ ํ์ด๋ก๋๊ฐ ์ต๋ ํ์ฉ ํฌ๊ธฐ์ธ 1,000๋ฐ์ดํธ๋ฅผ ์ด๊ณผํฉ๋๋ค.',
'auth/email-already-exists':
'์ ๊ณต๋ ์ด๋ฉ์ผ์ ๊ธฐ์กด ์ฌ์ฉ์๊ฐ ์ด๋ฏธ ์ฌ์ฉ ์ค์
๋๋ค. ๊ฐ ์ฌ์ฉ์๋ง๋ค ์ด๋ฉ์ผ์ด ๊ณ ์ ํด์ผ ํฉ๋๋ค.',
'auth/email-already-in-use': '์ด๋ฉ์ผ์ด ์ด๋ฏธ ์ฌ์ฉ์ค์
๋๋ค.',
'auth/id-token-expired': '์ ๊ณต๋ Firebase ID ํ ํฐ์ด ๋ง๋ฃ๋์์ต๋๋ค.',
'auth/id-token-revoked': 'Firebase ID ํ ํฐ์ด ์ทจ์๋์์ต๋๋ค.',
'auth/insufficient-permission':
'Admin SDK ์ด๊ธฐํ์ ์ฌ์ฉ๋ ์ฌ์ฉ์ ์ธ์ฆ ์ ๋ณด์๋ ์์ฒญํ ์ธ์ฆ ๋ฆฌ์์ค์ ์ก์ธ์คํ ๊ถํ์ด ์์ต๋๋ค.',
'auth/internal-error': '์ธ์ฆ ์๋ฒ์์ ์๊ธฐ์น ์์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.',
'auth/invalid-argument': '์ธ์ฆ ๋ฉ์๋์ ์๋ชป๋ ์ธ์๊ฐ ์ ๊ณต๋์์ต๋๋ค.',
'auth/invalid-claims': 'setCustomUserClaims()์ ์ ๊ณต๋ ์ปค์คํ
ํด๋ ์ ์์ฑ์ด ์๋ชป๋์์ต๋๋ค.',
'auth/invalid-continue-uri': '์ฐ๊ฒฐ URL์ ์ฌ๋ฐ๋ฅธ URL ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-creation-time': '์์ฑ ์๊ฐ์ด ์ฌ๋ฐ๋ฅธ UTC ๋ ์ง ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-disabled-field': 'disabled ์ฌ์ฉ์ ์์ฑ์ ์ ๊ณต๋ ๊ฐ์ด ์๋ชป๋์์ต๋๋ค. ์ด ๊ฐ์ ๋ถ์ธ์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-display-name':
'displayName ์ฌ์ฉ์ ์์ฑ์ ์ ๊ณต๋ ๊ฐ์ด ์๋ชป๋์์ต๋๋ค. ์ด ๊ฐ์ ๋น์ด ์์ง ์์ ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-dynamic-link-domain':
'์ ๊ณต๋ ๋์ ๋งํฌ ๋๋ฉ์ธ์ด ๊ตฌ์ฑ๋์ง ์๊ฑฐ๋ ํ์ฌ ํ๋ก์ ํธ์ ๋ํด ์น์ธ๋์ง ์์์ต๋๋ค.',
'auth/invalid-email': 'email ์ฌ์ฉ์ ์์ฑ์ ์ ๊ณต๋ ๊ฐ์ด ์๋ชป๋์์ต๋๋ค. ์ด ๊ฐ์ ๋ฌธ์์ด ์ด๋ฉ์ผ ์ฃผ์์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-email-verified': 'emailVerified ์ฌ์ฉ์ ์์ฑ์ ์ ๊ณต๋ ๊ฐ์ด ์๋ชป๋์์ต๋๋ค. ์ด ๊ฐ์ ๋ถ์ธ์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-hash-algorithm': 'ํด์ ์๊ณ ๋ฆฌ์ฆ์ด ์ง์๋๋ ์๊ณ ๋ฆฌ์ฆ ๋ชฉ๋ก์ ๋ฌธ์์ด ์ค ํ๋์ ์ผ์นํด์ผ ํฉ๋๋ค.',
'auth/invalid-hash-block-size': 'ํด์ ๋ธ๋ก ํฌ๊ธฐ๊ฐ ์ฌ๋ฐ๋ฅธ ์ซ์์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-hash-derived-key-length': 'ํด์์์ ํ์๋ ํค ๊ธธ์ด๊ฐ ์ฌ๋ฐ๋ฅธ ์ซ์์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-hash-key': 'ํด์ ํค๊ฐ ์ฌ๋ฐ๋ฅธ ๋ฐ์ดํธ ๋ฒํผ์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-hash-memory-cost': 'ํด์ ๋ฉ๋ชจ๋ฆฌ ๋น์ฉ์ด ์ฌ๋ฐ๋ฅธ ์ซ์์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-hash-parallelization': 'ํด์ ๋ณ๋ ฌ ์ฒ๋ฆฌ๊ฐ ์ฌ๋ฐ๋ฅธ ์ซ์์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-hash-rounds': 'ํด์ ๋ผ์ด๋๊ฐ ์ฌ๋ฐ๋ฅธ ์ซ์์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-hash-salt-separator': 'ํด์ฑ ์๊ณ ๋ฆฌ์ฆ ์ํธ ๊ตฌ๋ถ์ ํ๋๊ฐ ์ฌ๋ฐ๋ฅธ ๋ฐ์ดํธ ๋ฒํผ์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-id-token': '์ ๊ณต๋ ID ํ ํฐ์ด ์ฌ๋ฐ๋ฅธ Firebase ID ํ ํฐ์ด ์๋๋๋ค.',
'auth/invalid-last-sign-in-time': '๋ง์ง๋ง ๋ก๊ทธ์ธ ์๊ฐ์ด ์ฌ๋ฐ๋ฅธ UTC ๋ ์ง ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-page-token':
'listUsers()์ ์ ๊ณต๋ ๋ค์ ํ์ด์ง ํ ํฐ์ด ์๋ชป๋์์ต๋๋ค. ๋น์ด ์์ง ์์ ์ ํจํ ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-password': 'password ์ฌ์ฉ์ ์์ฑ์ ์ ๊ณต๋ ๊ฐ์ด ์๋ชป๋์์ต๋๋ค. ์ด ๊ฐ์ 6์ ์ด์์ ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-password-hash': '๋น๋ฐ๋ฒํธ ํด์๊ฐ ์ฌ๋ฐ๋ฅธ ๋ฐ์ดํธ ๋ฒํผ์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-password-salt': '๋น๋ฐ๋ฒํธ ์ํธ๊ฐ ์ฌ๋ฐ๋ฅธ ๋ฐ์ดํธ ๋ฒํผ์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-phone-number':
'phoneNumber์ ์ ๊ณต๋ ๊ฐ์ด ์๋ชป๋์์ต๋๋ค. ์ด ๊ฐ์ E.164 ํ์ค๊ณผ ํธํ๋๋ ๋น์ด ์์ง ์์ ์๋ณ์ ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-photo-url': 'photoURL ์ฌ์ฉ์ ์์ฑ์ ์ ๊ณต๋ ๊ฐ์ด ์๋ชป๋์์ต๋๋ค. ์ด ๊ฐ์ ๋ฌธ์์ด URL์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-provider-data': 'providerData๊ฐ ์ฌ๋ฐ๋ฅธ UserInfo ๊ฐ์ฒด ๋ฐฐ์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-provider-id': 'providerId๊ฐ ์ง์๋๋ ์ฌ๋ฐ๋ฅธ ์ ๊ณต์
์ฒด ์๋ณ์ ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-oauth-responsetype': '์ ํํ ํ๋์ OAuth responseType๋ง true๋ก ์ค์ ํด์ผ ํฉ๋๋ค.',
'auth/invalid-session-cookie-duration': '์ธ์
์ฟ ํค ๊ธฐ๊ฐ์ด 5๋ถ์์ 2์ฃผ ์ฌ์ด์ ์ฌ๋ฐ๋ฅธ ๋ฐ๋ฆฌ์ด ๋จ์ ์ซ์์ฌ์ผ ํฉ๋๋ค.',
'auth/invalid-uid': '์ ๊ณต๋ uid๋ 128์(์๋ฌธ ๊ธฐ์ค) ์ดํ์ ๋น์ด ์์ง ์์ ๋ฌธ์์ด์ด์ด์ผ ํฉ๋๋ค.',
'auth/invalid-user-import': '๊ฐ์ ธ์ฌ ์ฌ์ฉ์ ๋ ์ฝ๋๊ฐ ์๋ชป๋์์ต๋๋ค.',
'auth/maximum-user-count-exceeded': '๊ฐ์ ธ์ฌ ์ ์๋ ์ต๋ ์ฌ์ฉ์ ์๋ฅผ ์ด๊ณผํ์ต๋๋ค.',
'auth/missing-android-pkg-name': 'Android ์ฑ์ ์ค์นํด์ผ ํ ๊ฒฝ์ฐ Android ํจํค์ง ์ด๋ฆ์ ์ ๊ณตํด์ผ ํฉ๋๋ค.',
'auth/missing-continue-uri': '์์ฒญ์ ์ฌ๋ฐ๋ฅธ ์ฐ๊ฒฐ URL์ ์ ๊ณตํด์ผ ํฉ๋๋ค.',
'auth/missing-hash-algorithm':
'๋น๋ฐ๋ฒํธ ํด์๋ฅผ ์ฌ์ฉํด ์ฌ์ฉ์๋ฅผ ๊ฐ์ ธ์ค๋ ค๋ฉด ํด์ฑ ์๊ณ ๋ฆฌ์ฆ ๋ฐ ๋งค๊ฐ๋ณ์๋ฅผ ์ ๊ณตํด์ผ ํฉ๋๋ค.',
'auth/missing-ios-bundle-id': '์์ฒญ์ ๋ฒ๋ค ID๊ฐ ๋๋ฝ๋์์ต๋๋ค.',
'auth/missing-uid': 'ํ์ฌ ์์
์ uid ์๋ณ์๊ฐ ํ์ํฉ๋๋ค.',
'auth/missing-oauth-client-secret': 'OIDC ์ฝ๋ ํ๋ฆ์ ์ฌ์ฉ ์ค์ ํ๋ ค๋ฉด OAuth ๊ตฌ์ฑ ํด๋ผ์ด์ธํธ ๋น๋ฐ๋ฒํธ๊ฐ ํ์ํฉ๋๋ค.',
'auth/operation-not-allowed':
'์ ๊ณต๋ ๋ก๊ทธ์ธ ์ ๊ณต์
์ฒด๊ฐ Firebase ํ๋ก์ ํธ์์ ์ฌ์ฉ ์ค์ง๋์์ต๋๋ค. Firebase Console์ ๋ก๊ทธ์ธ ๋ฐฉ๋ฒ ์น์
์์ ์ฌ์ฉ ์ค์ ํ์ธ์.',
'auth/phone-number-already-exists':
'์ ๊ณต๋ phoneNumber์ ๊ธฐ์กด ์ฌ์ฉ์๊ฐ ์ด๋ฏธ ์ฌ์ฉ ์ค์
๋๋ค. ์ฌ์ฉ์๋ง๋ค phoneNumber๊ฐ ๊ณ ์ ํด์ผ ํฉ๋๋ค.',
'auth/reserved-claims': 'setCustomUserClaims()์ ์ ๊ณต๋ ํ๋ ์ด์์ ์ปค์คํ
์ฌ์ฉ์ ํด๋ ์์ด ์์ฝ๋์ด ์์ต๋๋ค.',
'auth/session-cookie-expired': '์ ๊ณต๋ Firebase ์ธ์
์ฟ ํค๊ฐ ๋ง๋ฃ๋์์ต๋๋ค.',
'auth/session-cookie-revoked': 'Firebase ์ธ์
์ฟ ํค๊ฐ ์ทจ์๋์์ต๋๋ค.',
'auth/uid-already-exists': '์ ๊ณต๋ uid๋ฅผ ๊ธฐ์กด ์ฌ์ฉ์๊ฐ ์ด๋ฏธ ์ฌ์ฉํ๊ณ ์์ต๋๋ค. ๊ฐ ์ฌ์ฉ์๋ง๋ค uid๊ฐ ๊ณ ์ ํด์ผ ํฉ๋๋ค.',
'auth/unauthorized-continue-uri':
'์ฐ๊ฒฐ URL์ ๋๋ฉ์ธ์ด ํ์ฉ ๋ชฉ๋ก์ ํฌํจ๋์ด ์์ง ์์ต๋๋ค. Firebase Console์์ ๋๋ฉ์ธ์ ํ์ฉํด์ผ ํฉ๋๋ค.',
'auth/user-not-found': '์ ๊ณต๋ ์๋ณ์์ ํด๋นํ๋ ๊ธฐ์กด ์ฌ์ฉ์ ๋ ์ฝ๋๊ฐ ์์ต๋๋ค.',
'auth/wrong-password': '๋น๋ฐ๋ฒํธ๊ฐ ๋ง์ง ์์ต๋๋ค.'
};