Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RetryOnNetworkErrorInterceptor should be configurable #5982

Closed
edenman opened this issue Jun 18, 2024 · 3 comments · Fixed by #5989
Closed

RetryOnNetworkErrorInterceptor should be configurable #5982

edenman opened this issue Jun 18, 2024 · 3 comments · Fixed by #5989

Comments

@edenman
Copy link
Contributor

edenman commented Jun 18, 2024

Use case

We currently have our own interceptor to handle retries on network errors, but

  1. it also retries if the http status code is 5xx
  2. we'd like the ability to configure the backoff duration

Not a huge deal (we can obviously keep using our own) but I'd like to switch to using NetworkMonitor+failFastIfOffline+retryOnError if possible

Describe the solution you'd like

No response

@martinbonnin
Copy link
Contributor

Agreed something needs to be done there. I've always tried to avoid giving "privileged" roles to interceptors so that they remain a generic list but the order matters (+ knowing whether a specific kind interceptor was set is also interesting information if we want a default behaviour). I'll look into this.

@martinbonnin
Copy link
Contributor

martinbonnin commented Jun 24, 2024

ApolloClient.Builder.retryOnErrorInterceptor(ApolloInterceptor) is added in #5989

Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants