From 7e10d73dac766554ea5cb70214887fbce1df4a85 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Sat, 24 Dec 2022 16:28:41 -0500 Subject: [PATCH] use connection revoked error --- .../#connection_name/#connection_id/access-token.ts | 3 +-- 1 file changed, 1 insertion(+), 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);