I am creating a login page in react, when I submit incorrect values want the server response message text for status code 400. It just gives the below error: Error: Request failed with status code 400
axios
.post(
"users/login",
{
email: user.email,
password: user.password
})
.then(res => {
return res.data;
})
.catch(err => {
return err.message;
});
Need to get the error message text