This error typically occurs when there's an issue with the request body parsing or the data sent to the server, especially when creating POST, PUT, and PATCH requests.
To fix this, add the body parsing middleware configuration below to your code to enable nodeJS to parse incoming JSON data correctly.
app.use(express.json());
Adding the code above solved this error when I experienced it.
PS: Next time, add your code or specify which route caused the error so people can fully understand your question.