fix: show a distinct error message when a user tries to create an account using a personal gmail (#3710)

* fix: show a different error message when a user tries to create an account using a personal gmail

* throw only after attempting to find the team
This commit is contained in:
Nan Yu
2022-07-01 13:21:23 -07:00
committed by GitHub
parent adb55fa965
commit 4b166432e6
4 changed files with 34 additions and 2 deletions

View File

@@ -136,6 +136,14 @@ export function TeamDomainRequiredError(
});
}
export function GmailAccountCreationError(
message = "Cannot create account using personal gmail address"
) {
return httpErrors(400, message, {
id: "gmail_account_creation",
});
}
export function AuthRedirectError(
message = "Redirect to the correct domain after authentication",
redirectUrl: string