Skip to content

Commit

Permalink
updated response to res.boom
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhan-sundar-goutam committed Nov 5, 2024
1 parent 8604f61 commit 6b849e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/external-accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ const linkExternalAccount = async (req, res) => {
await discordServices.removeRoleFromUser(unverifiedRoleId, attributes.discordId, req.userData);
} catch (error) {
logger.error(`Error getting external account data: ${error}`);
return res.status(500).json({ message: `Role Deletion failed. Please contact admin.` });
return res.boom.internal("Role Deletion failed. Please contact admin.", {
message: "Role Deletion failed. Please contact admin.",
});
}

return res.status(204).json({ message: "Your discord profile has been linked successfully" });
Expand Down

0 comments on commit 6b849e5

Please sign in to comment.