While sending a this.$inertia.patch request I'm unable to catch a Network Error. I'm turning off the backend server to emulate a lost connection. The console shows: Uncaught (in promise) Error: Network Error.
I've tried Inertia's onError, tried adding a .catch after the request as well as a separate try...catch and used the Vue 2's
errorCaptured: function(err) {
console.log('Caught error', err.message)
},
I can give more details if needed.
So basically trying to catch net::ERR_CONNECTION_REFUSED
Edit: I moved to using onFinish along with onSuccess and onStart, but finally used axios
Use onStart along with onSuccess and onFinish:
onFinish will trigger without onSuccess.onError will trigger with onFinish