Handle offline actions
CheckInternetchecks connectivity inbeforeand reports aUserExceptionif
offline. Override connectionException to customize the error.
- Add
NoDialogafterCheckInternetto suppress its dialog and use the failure
helpers for inline feedback.
- Use
AbortWhenNoInternetwhen offline work should be skipped silently. - Use
UnlimitedRetryCheckInternetwhen work should keep trying. It includes a
connectivity check before each attempt and prevents duplicate in-flight dispatches.
Use shouldRetry to stop on permanent failures. Awaiting this action may wait indefinitely.
These checks report connectivity and HTTP or server errors still need handling.
With CheckInternet, an offline failure happens in before, outside a plain Retry
mixin's retry loop. Check the mixin compatibility matrix when combining behaviors.
In tests set store.forceInternetOnOffSimulation = () => false for offline, true for
online, or have the callback return null to use actual connectivity.