riverpod-retry

Installation
SKILL.md

Riverpod — Automatic retry

Instructions

Riverpod retries providers when their computation throws. Retry can be customized per provider or globally.

Default behavior

By default a provider is retried up to a limit (e.g. 10 times) with exponential backoff (e.g. 200ms to 6.4s). Error and ProviderException are not retried: Error indicates a bug; ProviderException means a dependency failed, so the dependent provider is not retried (the underlying one is).

Custom retry function

A retry function has signature Duration? Function(int retryCount, Object error). Return a Duration for the delay before the next retry, or null to stop.

Duration? myRetry(int retryCount, Object error) {
  if (retryCount >= 5) return null;
  if (error is ProviderException) return null;
  return Duration(milliseconds: 200 * (1 << retryCount));
Related skills

More from serverpod/skills-registry

Installs
19
GitHub Stars
8
First Seen
Mar 20, 2026