axios catch doesn't catch error
问题 I'm using axios 0.17.0 with the following code: this.props.userSignupRequest(this.state) .then( res => { console.log(res.data) } ) .catch( err => { this.setState({ errors: err.response }) } ) And the server is set to return a 400 when user signup validation doesn't pass. That also shows up in console: POST 400 (Bad Request) , but the setState is not being executed. Why is that? I also tried console.log(err) and nothing. 回答1: A few issues could be at play, we'll likely need to see more of your