What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-28 00:51:03
(node:65723) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
router.get("/userprofile", passport.authenticate('jwt', { session: false }), (req, res) => { Profile.findOne({ user: req.user.id }).then(profile => { if (!profile) { return res.status(404).json({ error: "No Profile Found&... Add solution
Best helpers
Erica Price
+5
Scoiattolo
+5
Vigrond
+5
Muazam
+5
Emmet
+5
NeuronQ
+5
A G Davey
+5
Arad
+5
Meital Regev
+5
Entrepreneur
+5
Majte
+5
JoshuaFicy
+5