Skip to content

Commit

Permalink
Add missing default exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-wada authored and iMacTia committed Feb 20, 2024
1 parent 1be9551 commit 0b769c4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ retry_options = {
#### Specify which exceptions should trigger a retry

You can provide an `exceptions` option with a list of exceptions that will replace
the default list of network-related exceptions: `Errno::ETIMEDOUT`, `Timeout::Error`, `Faraday::TimeoutError`.
the default exceptions: `Errno::ETIMEDOUT`, `Timeout::Error`, `Faraday::TimeoutError`, `Faraday::Error::RetriableResponse`.
This can be particularly useful when combined with the [RaiseError][raise_error] middleware.

```ruby
Expand Down Expand Up @@ -144,10 +144,8 @@ retry_options = {
You can specify a proc object through the `retry_block` option that will be called before every
retry, before There are many different applications for this feature, spacing from instrumentation to monitoring.


The block is passed keyword arguments with contextual information: Request environment, middleware options, current number of retries, exception, and amount of time we will wait before retrying. (retry_block is called before the wait time happens)


For example, you might want to keep track of the response statuses:

```ruby
Expand Down

0 comments on commit 0b769c4

Please sign in to comment.