422不返回发送消息(Node.js / Redux)

我有一个问题,我的node.js服务器正在向浏览器返回一个422消息,但浏览器只是看到了422,没有任何消息。

//Node.js if (existingUser) { return res.status(422).send({ error: 'Email is in use' }); } 

我可以确认它正在那里,然后返回

 //Redux method export function signupUser({ email, password }) { return function(dispatch) { return axios.post(`${ROOT_URL}/signup`, { email, password }) .then(response => { dispatch(emailWasSent(response.data.return_msg)); }) .catch(response => { dispatch(authError(response.data.error));}); } } 

它会触发渔获,但回应只包含422

 //Console.log of response Error: Request failed with status code 422 

看了一天后,我发现这是一个axios问题。 他们改变了他们的catch案。 现在应该是

 error.response.data.error