I send a request like this
try {
const res = await axios.post('/order', formData)
console.log(res) --> undefined
console.log(test1) --> it is on console
}
catch (error) {
console.log(test2)
}
but for some reason even I get 500 from request, test1 and undefined are on console. Why is this happening even it is an error. Shouldnt it go to catch?
--- SOLUTION ---
I found what is wrong after 4 days. After I removed axios.interceptor from code everything works as expected