axios – on POST errors JSON response from api server not being printed
When you POST from curl, you are getting the JSON response from the server that you setup.
On your frontend when trying to print the error to the console it’s not coming up. Instead you get the following:
xhr.js:166 POST MYURLHERE 400 (Bad Request)
Even if you print the whole error or JSON stringify the error you aren’t seeing the response
ANSWER
make sure you are printing error.response.data