Network errors with the offlineExchange #1520
-
Hello there. We are using the offlineExchange to bring some offline capabilities in our app. The docs state that we no longer get Network Errors when using the offlineExchange
is there any way to get the Network Errors while using the offlineExchange? I tried using the errorExchange but failed network requests don't seem to get there. We want to implement an error screen if the request fails for any reason (offline, timed out due to slow connection etc) with a retry button. We can determine if the device is offline but without Network Errors we are having trouble handling slow connection/timeouts |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you placing the We're also still thinking about how to improve this process. Our original idea behind this mechanism of swallowed errors is that the UI should be completely resilient to offline states. However, we realise now that sometimes there need to be escape hatches when an incomplete result (partial or empty; no matter) just isn't enough. Until then the Specifically, it filters out failed mutation results before the While the mechanism for mutations is pretty solid in my opinion, since optimistic mutations can safely remain optimistically applied indefinitely until the network connection is restored, it's offline queries that are not at their full potential yet, as long as we swallow the errors. |
Beta Was this translation helpful? Give feedback.
Are you placing the
errorExchange
before or after theofflineExchange
? If it's not showing you the network errors then it's likely before theofflineExchange
; as operations travel forward in the list of exchanges and results backwards by the time the network error reaches theofflineExchange
it may be swallowed if you're looking at failed queries, so you'll have to place it after theofflineExchange
.We're also still thinking about how to improve this process. Our original idea behind this mechanism of swallowed errors is that the UI should be completely resilient to offline states. However, we realise now that sometimes there need to be escape hatches when an incomplete result (partial o…