Skip to content

Commit f889dff

Browse files
authored
Handling the EMAIL_EXISTS error code (#348)
1 parent 733481d commit f889dff

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

firebase_admin/_auth_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ def __init__(self, message, cause=None, http_response=None):
257257
_CODE_TO_EXC_TYPE = {
258258
'DUPLICATE_EMAIL': EmailAlreadyExistsError,
259259
'DUPLICATE_LOCAL_ID': UidAlreadyExistsError,
260+
'EMAIL_EXISTS': EmailAlreadyExistsError,
260261
'INVALID_DYNAMIC_LINK_DOMAIN': InvalidDynamicLinkDomainError,
261262
'INVALID_ID_TOKEN': InvalidIdTokenError,
262263
'PHONE_NUMBER_EXISTS': PhoneNumberAlreadyExistsError,

tests/test_user_mgt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ class TestCreateUser(object):
292292
already_exists_errors = {
293293
'DUPLICATE_EMAIL': auth.EmailAlreadyExistsError,
294294
'DUPLICATE_LOCAL_ID': auth.UidAlreadyExistsError,
295+
'EMAIL_EXISTS': auth.EmailAlreadyExistsError,
295296
'PHONE_NUMBER_EXISTS': auth.PhoneNumberAlreadyExistsError,
296297
}
297298

0 commit comments

Comments
 (0)