Skip to content
Permalink
Browse files
fix: improves error messages
  • Loading branch information
MantasMikal committed Feb 6, 2021
1 parent 1231f36 commit 5287fdf0cc4180779eb21c5c0e67a48c7635fd44
Showing 1 changed file with 2 additions and 2 deletions.
@@ -100,8 +100,8 @@ router.post("/register", async (req, res) => {
email: user.email,
code: secretVerificationCode,
});

verificationCode.save();

console.log("Created new account for: ", email);
await mailTo(
[email],
@@ -178,7 +178,7 @@ router.post("/authenticate", async (req, res) => {
await User.findOneAndUpdate({ email: email }, { authDuration: authDuration });
res.json({ status: "ok" });
} catch (e) {
res.status(500).json({ error: "Failed due internal server error" });
res.status(500).json({ error: "Failed due internal server error: " + e.message });
}
}
}

0 comments on commit 5287fdf

Please sign in to comment.