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
P粉9358832922024-03-28 09:42:14
Use onStart
with onSuccess
and onFinish
:
onFinish
will fire and onSuccess
. onError
will be triggered with onFinish