mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-29 08:15:23 +00:00
use connection revoked error
This commit is contained in:
+1
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user