Skip to content

Commit

Permalink
add better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
C4illin committed Dec 2, 2024
1 parent d62b8f7 commit 60a40d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ app.post("/register", async (req, res) => {
);
} catch (err) {
console.error(err);
res.status(500).send("Failed to send confirmation email");
res.status(500).send("Failed to send confirmation email. Check if email is correct. Otherwise contact support@chs.se");
return;
}
} else {
res
.status(400)
.send(
"Account already exists but is not active, and no confirmation token found. Contact an admin for assistance."
"Account already exists but is not active, and no confirmation token found. Contact support@chs.se for assistance."
);
}
} else {
Expand All @@ -196,7 +196,7 @@ app.post("/register", async (req, res) => {
await sendConfirmationEmail(userEmail, req.headers.host, token);
} catch (err) {
console.error(err);
res.status(500).send("Failed to send confirmation email");
res.status(500).send("Failed to send confirmation email. Check if email is correct. Otherwise contact support@chs.se");
return;
}

Expand Down

0 comments on commit 60a40d8

Please sign in to comment.