This may seem stupid, but I\'m trying to get the error data when a request fails in Axios.
axios.get(\'foo.com\') .then((response) => {}) .catch((
There is a new option called validateStatus in request config. You can use it to specify to not throw exceptions if status < 100 or status > 300 (default behavior). Example:
validateStatus
const {status} = axios.get('foo.com', {validateStatus: () => true})