mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-27 08:13:28 +08:00
added better error to try to identify an issue
This commit is contained in:
parent
11d768e89e
commit
5c93fa7edf
1 changed files with 9 additions and 1 deletions
|
@ -84,7 +84,15 @@ export async function sendVerificationEmail(
|
|||
e.message.includes("TOO_MANY_ATTEMPTS_TRY_LATER")
|
||||
) {
|
||||
// for some reason this error is not handled with a custom auth/ code, so we have to do it manually
|
||||
throw new MonkeyError(429, "Too many requests. Please try again later.");
|
||||
throw new MonkeyError(429, "Too many requests. Please try again later");
|
||||
}
|
||||
if (e.code === "auth/user-not-found") {
|
||||
throw new MonkeyError(
|
||||
500,
|
||||
"Auth user not found when the user was found in the database",
|
||||
JSON.stringify({ email: email, userInfoEmail: email, stack: e.stack }),
|
||||
userInfo.uid
|
||||
);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue