Skip to content

Commit e641899

Browse files
authored
Added EMAIL_EXISTS Auth error message. (#141)
1 parent d672e23 commit e641899

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

FirebaseAdmin/FirebaseAdmin.Tests/Auth/AuthErrorHandlerTest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public class AuthErrorHandlerTest
4040
AuthErrorCode.UidAlreadyExists,
4141
},
4242
new object[]
43+
{
44+
"EMAIL_EXISTS",
45+
ErrorCode.AlreadyExists,
46+
AuthErrorCode.EmailAlreadyExists,
47+
},
48+
new object[]
4349
{
4450
"PHONE_NUMBER_EXISTS",
4551
ErrorCode.AlreadyExists,

FirebaseAdmin/FirebaseAdmin/Auth/AuthErrorHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ internal sealed class AuthErrorHandler
4949
AuthErrorCode.UidAlreadyExists,
5050
"The user with the provided uid already exists")
5151
},
52+
{
53+
"EMAIL_EXISTS",
54+
new ErrorInfo(
55+
ErrorCode.AlreadyExists,
56+
AuthErrorCode.EmailAlreadyExists,
57+
"The user with the provided email already exists")
58+
},
5259
{
5360
"PHONE_NUMBER_EXISTS",
5461
new ErrorInfo(

0 commit comments

Comments
 (0)