retryWithBackoff(fn, config, shouldRetry) | Retries an async function with exponential backoff. |
calculateBackoff(attempt, config) | Computes the delay for a given retry attempt with jitter. |
fetchWithTimeout(url, options, timeoutMs) | Wraps fetch() with an AbortController timeout. |
isNetworkError(error) | Checks for network-level errors (TypeError, ECONNREFUSED, and others). |
isTimeoutError(error) | Checks for timeout/abort errors. |
isRetryableError(error) | Returns true for network errors, timeouts, 5xx, and 429 status codes. |
isAuthError(error) | Returns true for 401/403 or Unauthorized/Forbidden errors. |
parseSyncId(value) | Validates a string-encoded sync ID without losing precision. |