Skip to content

Commit

Permalink
fix(discord): 🚑 Catch error with bot responses
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Jul 15, 2024
1 parent b2b6e60 commit d26ce1e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util/DiscordIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ class DiscordIntegration {
"Content-type": "application/json",
Authorization: `Bearer ${this.botSecret}`,
},
}).then((res) => res.json());
})
.then((res) => res.json())
.catch((e) => {
this.core.getLogger().error(e);
return { error: "NOT_FOUND" };
});
}

public async isOnServer(user: string) {
Expand Down

0 comments on commit d26ce1e

Please sign in to comment.