Skip to content

Commit

Permalink
Improves retry middleware documentation. (#1228)
Browse files Browse the repository at this point in the history
  • Loading branch information
iMacTia authored Dec 31, 2020
1 parent 687108b commit 453b26f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/middleware/request/retry.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ retry_options = {

### Call a block on every retry

You can specify a block through the `retry_block` option that will be called every time the request is retried.
You can specify a block through the `retry_block` option that will be called before every retry.
There are many different applications for this feature, spacing from instrumentation to monitoring.
Request environment, middleware options, current number of retries and the exception is passed to the block as parameters.
For example, you might want to keep track of the response statuses:
Expand Down
2 changes: 1 addition & 1 deletion lib/faraday/request/retry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def retry_statuses
# not independent of the retry count. This would be useful
# if the exception produced is non-recoverable or if the
# the HTTP method called is not idempotent.
# @option options [Block] :retry_block block that is executed after
# @option options [Block] :retry_block block that is executed before
# every retry. Request environment, middleware options, current number
# of retries and the exception is passed to the block as parameters.
# @option options [Array] :retry_statuses Array of Integer HTTP status
Expand Down

0 comments on commit 453b26f

Please sign in to comment.