Closed bklop closed 3 years ago
Hi there @bklop thanks for filing the issue, this is interesting because I thought this test would make sure we are throwing proper errors 🤔 so is this only when status code = 0? (i.e. cors/connectivity error)
Yeah exactly. I'm not sure why xhr.status <> 0
was added in that commit, shouldn't it be sufficient to check for ReadyState.Done && not token.IsCancellationRequested
?
Done! The fix should be available in v7.11 🚀
Commit 4cd23641182ca82e27dfafa25dc827295840b28b added support for cancellation, but also checks for
xhr.status <> 0
which causes it to swallow anyXMLHttpRequest
errors.In practice this means that client code such as this (using Elmish here as an example)
will never dispatch a SomethingError msg in case of a network error (for example, a lost connection). This is breaking application functionality for us and we were forced to rollback to Fable.Remoting.Client 7.8 for now :).