Skip to main content

Error Filtering

Not every failure should trigger a retry.

The shouldRetry predicate gives you full control:

@Rebound({
shouldRetry: (err) => err.status >= 500,
})

Common patterns:

  • Retry only on 5xx server errors
  • Avoid retrying on 4xx validation errors
  • Retry on network timeouts
  • Retry on Axios network failures, but not business logic errors