I am unable to catch network errors when sending this.$inertia.patch
request. I'm shutting down the backend server to simulate a lost connection. The console displays: Uncaught (in Promise) Error: Network Error
.
I've tried Inertia's onError
, tried adding .catch
after the request and a separate try...catch
and using Vue 2
errorCaptured: function(err) { console.log('Caught error', err.message) },
I can provide more details if needed.
So basically trying to catch net::ERR_CONNECTION_REFUSED
Edit: I started using onFinish
along with onSuccess
and onStart
, but ended up using axios
Use
onStart
withonSuccess
andonFinish
:onFinish
will fire andonSuccess
.onError
will be triggered withonFinish