I'm hitting my own endpoint which returns res.status(500).json({ message: 'Server Error' }). i can see the correct response in Chrome devtools network tab. however, on my app i get Error: Request failed with status code 500
return this.$axios.$get('/...')
.then(res => {
console.log(res)
})
.catch(err => {
console.log(err)
})
its the same for all error codes. the only way i can receive a json is with status 200.
am i missing something here? any help would be appreciated!
same - I think this stems from axios itself being broken in the latest version: https://github.com/axios/axios/issues/1085
Try to get the response
...
.catch(err => {
console.log(err.response)
})
@anteriovieira that works for me! could have sworn i tried it though
Closing as this seems not directly related to this repo.
Most helpful comment
Try to get the
response