try { await axios.get('/bad-call') } catch (error) { const err = error as AxiosError if (err.response) { console.log(err.response.status) console.log(err.response.data) } this.handleAxiosError(error) }
axios.get('/my-highly-available-api').then(response => { // do stuff }) .catch(err => { // what now? console.log(err); })