Skip to content

Commit

Permalink
Change retry copy to match stripe-ruby and stripe-python
Browse files Browse the repository at this point in the history
  • Loading branch information
brandur committed Aug 14, 2019
1 parent b7fac25 commit 9724279
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ if err := i.Err(); err != nil {

### Configuring Automatic Retries

The library can be configured to automatically retry requests that fail due to
an intermittent network problem or other knowingly non-deterministic errors:
You can enable automatic retries on requests that fail due to a transient
problem by configuring the maximum number of retries:

```go
import (
Expand All @@ -294,6 +294,9 @@ sc.Init("sk_key", &stripe.Backends{
coupon, err := sc.Coupons.New(...)
```

Various errors can trigger a retry, like a connection error or a timeout, and
also certain API responses like HTTP status `409 Conflict`.

[Idempotency keys][idempotency-keys] are added to requests to guarantee that
retries are safe.

Expand Down

0 comments on commit 9724279

Please sign in to comment.