Package:
@hexos/runtimeDetermines whether an error is transient and safe to retry.
Classifies errors as retryable based on three criteria:
- HTTP status codes: 408 (timeout), 429 (rate limit), 5xx (server errors)
- Network error codes: ECONNRESET, ETIMEDOUT, ECONNREFUSED, etc.
- Error message keywords: “timeout”, “rate limit”, “temporarily unavailable”, “network”
Used as the default predicate for retryWithBackoff when no custom
shouldRetry function is provided.
function isRetryableError(error: unknown): booleanParameters
error
unknown