mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-05 04:56:48 +08:00
updated messages
This commit is contained in:
parent
2dd1baac95
commit
14ad135483
1 changed files with 4 additions and 4 deletions
|
@ -175,25 +175,25 @@ async function authenticateWithBearerToken(
|
|||
if (errorCode?.includes("auth/id-token-expired")) {
|
||||
throw new MonkeyError(
|
||||
401,
|
||||
"Token expired. Please login again.",
|
||||
"Token expired - please login again",
|
||||
"authenticateWithBearerToken"
|
||||
);
|
||||
} else if (errorCode?.includes("auth/id-token-revoked")) {
|
||||
throw new MonkeyError(
|
||||
401,
|
||||
"Token revoked. Please login again.",
|
||||
"Token revoked - please login again",
|
||||
"authenticateWithBearerToken"
|
||||
);
|
||||
} else if (errorCode?.includes("auth/user-not-found")) {
|
||||
throw new MonkeyError(
|
||||
404,
|
||||
"User not found.",
|
||||
"User not found",
|
||||
"authenticateWithBearerToken"
|
||||
);
|
||||
} else if (errorCode?.includes("auth/argument-error")) {
|
||||
throw new MonkeyError(
|
||||
400,
|
||||
"Incorrect Bearer token format.",
|
||||
"Incorrect Bearer token format",
|
||||
"authenticateWithBearerToken"
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue