Skip to content

Commit

Permalink
Add instructions on how to inherit the default exceptions to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-wada committed Feb 19, 2024
1 parent df4b205 commit 48caac6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ retry_options = {
}
```

If you want to inherit existing exceptions, do it this way.

```ruby
retry_options = {
exceptions: Faraday::Retry::Middleware::DEFAULT_EXCEPTIONS + [Faraday::ResourceNotFound, Faraday::UnauthorizedError]
}
```

#### Specify on which response statuses to retry

By default the `Retry` middleware will only retry the request if one of the expected exceptions arise.
Expand Down

0 comments on commit 48caac6

Please sign in to comment.