digitalocean / digitalocean/droplet_kit
Faraday's retry configuration is not exposed
- Dominant language
- Ruby
- Stars
- 521
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
Faraday includes [a retry middleware module](https://github.com/lostisland/faraday/blob/master/lib/faraday/request/retry.rb).
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
```ruby
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]
}
)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.