If I use Throw new Error("User not found"), then it gives in response
{status:false,message:"User Not Found"}
But with status code 500, And I need Status 400 in Postman
custom Error using throw function
but if we use res.status(500).send({ status: false, message: "User not found" })
then it gives status code 400, And I need Status 400 in Postman . So, I need same status code in postman only.This is the problem. Tyler2P and Abin Bala , I followed your code but I am unable to get desired status code in postman status.