You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instead of : if (!foundUser) return next(createError.NotFound("User not found"));
i want to send an object like this :
if(!foundUser)returnnext(createError.NotFound({field : "email",message: "User not found"}));// the same as : res.status(404).json({field:"email", message:"User not found"})