Saltar al contenido principal

Firma

run<T>(fn, options?): Promise<RunResult<T>>

Opciones clave

  • Normalización y transformación: toError, mapError
  • Callbacks: onError, onSuccess, onFinally, onRetry, onAbort
  • Control: ignoreAbort, signal, timeout
  • Reintentos: retries, retryDelay, shouldRetry, jitter, backoffStrategy, maxDelay
  • Observabilidad: logger
  • Limpieza: cleanup
  • Circuito: circuitBreaker

Ejemplo básico

Abort y timeout

Reintentos con backoff y jitter

Circuit breaker por llamada