SyntaxFix
Write A Post
Hire A Developer
Questions
I tried
res.status(400); res.send('message');
..but it was giving me error:
(node:208) UnhandledPromiseRejectionWarning: Error: Can't set headers after they are sent.
This work for me
res.status(400).send(yourMessage);