Merged in feat/LOY-158-signup-with-existing-email-error-handling (pull request #1441)
Feat/LOY-158 signup with existing email error handling * feat(LOY-158): Add handling for email conflict during signup - Implement specific error handling for email conflict in signup form - Add localized error message for existing email accounts across language dictionaries - Introduce new error type `conflictError` in trpc error handling * fix(LOY-158): revert translation changes * fix(LOY-158): Correct Finnish translation for cancellation message Approved-by: Christian Andolf
This commit is contained in:
@@ -51,6 +51,15 @@ export default function SignupForm({ title }: SignUpFormProps) {
|
||||
}
|
||||
},
|
||||
onError: (error) => {
|
||||
if (error.data?.code === "CONFLICT") {
|
||||
toast.error(
|
||||
intl.formatMessage({
|
||||
id: "An account with this email already exists. Please try signing in instead.",
|
||||
})
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
toast.error(intl.formatMessage({ id: "Something went wrong!" }))
|
||||
console.error("Component Signup error:", error)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user