diff options
-rw-r--r-- | src/api/routes/users/@me/connections/#connection_name/#connection_id/access-token.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/api/routes/users/@me/connections/#connection_name/#connection_id/access-token.ts b/src/api/routes/users/@me/connections/#connection_name/#connection_id/access-token.ts index 1ad1c7a7..3f4de8b5 100644 --- a/src/api/routes/users/@me/connections/#connection_name/#connection_id/access-token.ts +++ b/src/api/routes/users/@me/connections/#connection_name/#connection_id/access-token.ts @@ -58,8 +58,7 @@ router.get("/", route({}), async (req: Request, res: Response) => { ], }); if (!connectedAccount) throw DiscordApiErrors.UNKNOWN_CONNECTION; - if (connectedAccount.revoked) - throw new ApiError("Connection revoked", 0, 400); + if (connectedAccount.revoked) throw DiscordApiErrors.CONNECTION_REVOKED; if (!connectedAccount.token_data) throw new ApiError("No token data", 0, 400); |