Skip to content

Commit

Permalink
Handle webhook post error response in incrementVote function
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev committed Oct 21, 2024
1 parent 203efcf commit 2743a6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/utils/servers/incrementVote.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async function incrementVote(guildId, userId) {

const response = await axios
.post(server.webhook.url, { server: guild.id, user: user.id }, { headers, timeout: 2000, responseType: 'text' })
.catch(() => null);
.catch(error => error.response);

const data = {
url: server.webhook.url,
Expand Down

0 comments on commit 2743a6a

Please sign in to comment.