feat(auth): enhance error handling for sign-up and existing user checks (#14953)

Refactored error handling in `useSignUpInNewWorkspace` and `useSignInUp`
hooks to provide user-friendly messages. Added validation for existing
users during sign-up, updating server-side logic to throw specific
exceptions (`USER_ALREADY_EXIST`).

Fix
https://twenty-v7.sentry.io/issues/6686753138/events/latest/?environment=prod&project=4507072499810304&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20QueryFailedError&referrer=latest-event&sort=date

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Antoine Moreaux
2025-10-08 15:43:43 +02:00
committed by GitHub
parent 2e9779b511
commit 8e83be43fe
19 changed files with 555 additions and 144 deletions
@@ -173,7 +173,7 @@ export const SignInUpGlobalScopeForm = () => {
return;
}
continueWithCredentials();
await continueWithCredentials();
};
const onEmailChange = (email: string) => {