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

Faraday's retry configuration is not exposed #192

Open
stavxyz opened this issue Jul 8, 2019 · 1 comment
Open

Faraday's retry configuration is not exposed #192

stavxyz opened this issue Jul 8, 2019 · 1 comment

Comments

@stavxyz
Copy link

stavxyz commented Jul 8, 2019

Faraday includes a retry middleware module.

At present, droplet_kit does not expose this thus retries are not configurable unless the client's initialize and connection methods are overridden into a new client (as far as I can tell).

An enhancement here would produce an interface something like this

client = DropletKit::Client.new(
  access_token: 'YOUR_TOKEN',
  retry_exceptions: [CustomException, 'Timeout::Error'],
  retry_statuses: [500, 501]
)

# or I think I prefer this:

client = DropletKit::Client.new(
  access_token: 'YOUR_TOKEN',
  retry: {
    exceptions: [CustomException, 'Timeout::Error'],
    statuses: [500, 501]
  }
)
@hilary
Copy link
Contributor

hilary commented Dec 18, 2019

We're planning a thorough overhaul of droplet_kit in the near future. Retries then!

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

No branches or pull requests

2 participants