Repository navigation
failnext v0.7.0
This release adds request-scoped endpoint exclusion.
You can now use WithExcludedEndpoints when your application wants to try a request again without one or more providers.
A common case is JSON-RPC over HTTP: a provider may return HTTP 200, but the JSON-RPC response still contains an error. failnext does not inspect that payload or decide what the error means. Your application can make that decision and, if needed, retry with the provider excluded.
Exclusions apply to endpoint selection only. They do not change failover permission, request replayability, cooldown, or failover trigger rules.
Changes
- Add
WithExcludedEndpoints - Support accumulating exclusions across derived contexts
- Return
ErrUnknownEndpointfor unknown excluded endpoint IDs - Return
ErrNoUsableEndpointwhen no endpoint remains available - Keep excluded preferred endpoints excluded
- Preserve existing eligibility, cooldown, permission, replayability, and trigger behavior
- Add conformance tests for exclusion interactions
- Update the README and package documentation
- Add a go-ethereum example showing how to retry without a provider that returned a JSON-RPC error
See the README and examples/goethereum/exclude-endpoint for examples.