Skip to content

Commit

Permalink
Merge pull request #1021 from tjoyal/faraday/retry-middleware
Browse files Browse the repository at this point in the history
Faraday retry middleware
  • Loading branch information
Katrina Owen authored May 30, 2018
2 parents 5d9a8e3 + 4716e5d commit 17921fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ traffic:

```ruby
stack = Faraday::RackBuilder.new do |builder|
builder.use Faraday::Request::Retry, exceptions: [Octokit::ServerError]
builder.use Octokit::Middleware::FollowRedirects
builder.use Octokit::Response::RaiseError
builder.use Octokit::Response::FeedParser
Expand Down
1 change: 1 addition & 0 deletions lib/octokit/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module Default

# Default Faraday middleware stack
MIDDLEWARE = RACK_BUILDER_CLASS.new do |builder|
builder.use Faraday::Request::Retry, exceptions: [Octokit::ServerError]
builder.use Octokit::Middleware::FollowRedirects
builder.use Octokit::Response::RaiseError
builder.use Octokit::Response::FeedParser
Expand Down

0 comments on commit 17921fb

Please sign in to comment.