-
-
Notifications
You must be signed in to change notification settings - Fork 923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry #3623
Retry #3623
Conversation
|
@rrousselGit is this feature intended for Riverpod 3.0 or a later release? This approach could potentially introduce various bugs
Considering these factors, handling all these cases during migration to Riverpod 3.0 could become unnecessarily complicated. |
Not really. Just disable retries globally on ProviderScope: ProviderScope(retry: (count, err) => null); It takes one line to migrate :)
That one is an interesting problem. But Riverpod should be able to detect that the exception is rethrown from a dependency, and silence the retry in this case.
It's usually better in terms of UI if the problem fixes itself.
If your app knows what is a solvable error vs what isn't, you can improve the default.
Retries are slow to trigger, and become even slower over time. It's unlikely to have a significant impact |
This is great! I skipped the new argument on the ProviderScope.
Exemplary, in the async case the AsyncValue would be AsyncError during a retry, if I understand it correctly. In the default case, we would then display an error screen with a linear ProgressIndicator that would be visible for 200ms - forever? (200ms would be very short if we display an error text) Is there a way how we can detect if a provider is retrying (I probably missed that too :D). This would be particularly useful if only a fixed number of retries is defined. Also, how does this concept work for a sync provider? Sorry for all the questions. |
Just checkin in briefly. Are there plans for an |
That's isRefreshing. |
I'm not sure if |
It will be true during retries. As retries are nothing more than an invalidateSelf on error. |
Thank you for the clarification! 👍 |
Related Issues
fixes #1037
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).I have updated the
CHANGELOG.md
of the relevant packages.Changelog files must be edited under the form:
If this contains new features or behavior changes,
I have updated the documentation to match those changes.