@@ -320,6 +320,7 @@ const (
320
320
idTokenRevoked = "id-token-revoked"
321
321
insufficientPermission = "insufficient-permission"
322
322
invalidDynamicLinkDomain = "invalid-dynamic-link-domain"
323
+ invalidEmail = "invalid-email"
323
324
phoneNumberAlreadyExists = "phone-number-already-exists"
324
325
projectNotFound = "project-not-found"
325
326
sessionCookieRevoked = "session-cookie-revoked"
@@ -354,6 +355,11 @@ func IsInvalidDynamicLinkDomain(err error) bool {
354
355
return internal .HasErrorCode (err , invalidDynamicLinkDomain )
355
356
}
356
357
358
+ // IsInvalidEmail checks if the given error was due to an invalid email.
359
+ func IsInvalidEmail (err error ) bool {
360
+ return internal .HasErrorCode (err , invalidEmail )
361
+ }
362
+
357
363
// IsPhoneNumberAlreadyExists checks if the given error was due to a duplicate phone number.
358
364
func IsPhoneNumberAlreadyExists (err error ) bool {
359
365
return internal .HasErrorCode (err , phoneNumberAlreadyExists )
@@ -396,6 +402,7 @@ var serverError = map[string]string{
396
402
"EMAIL_EXISTS" : emailAlreadyExists ,
397
403
"INSUFFICIENT_PERMISSION" : insufficientPermission ,
398
404
"INVALID_DYNAMIC_LINK_DOMAIN" : invalidDynamicLinkDomain ,
405
+ "INVALID_EMAIL" : invalidEmail ,
399
406
"PERMISSION_DENIED" : insufficientPermission ,
400
407
"PHONE_NUMBER_EXISTS" : phoneNumberAlreadyExists ,
401
408
"PROJECT_NOT_FOUND" : projectNotFound ,
0 commit comments