@@ -320,6 +320,7 @@ const (
320320 idTokenRevoked = "id-token-revoked"
321321 insufficientPermission = "insufficient-permission"
322322 invalidDynamicLinkDomain = "invalid-dynamic-link-domain"
323+ invalidEmail = "invalid-email"
323324 phoneNumberAlreadyExists = "phone-number-already-exists"
324325 projectNotFound = "project-not-found"
325326 sessionCookieRevoked = "session-cookie-revoked"
@@ -354,6 +355,11 @@ func IsInvalidDynamicLinkDomain(err error) bool {
354355 return internal .HasErrorCode (err , invalidDynamicLinkDomain )
355356}
356357
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+
357363// IsPhoneNumberAlreadyExists checks if the given error was due to a duplicate phone number.
358364func IsPhoneNumberAlreadyExists (err error ) bool {
359365 return internal .HasErrorCode (err , phoneNumberAlreadyExists )
@@ -396,6 +402,7 @@ var serverError = map[string]string{
396402 "EMAIL_EXISTS" : emailAlreadyExists ,
397403 "INSUFFICIENT_PERMISSION" : insufficientPermission ,
398404 "INVALID_DYNAMIC_LINK_DOMAIN" : invalidDynamicLinkDomain ,
405+ "INVALID_EMAIL" : invalidEmail ,
399406 "PERMISSION_DENIED" : insufficientPermission ,
400407 "PHONE_NUMBER_EXISTS" : phoneNumberAlreadyExists ,
401408 "PROJECT_NOT_FOUND" : projectNotFound ,
0 commit comments