Skip to content

Commit 6a5fad4

Browse files
committed
fix: retry on network errors
1 parent c34b7fc commit 6a5fad4

File tree

6 files changed

+1760
-1523
lines changed

6 files changed

+1760
-1523
lines changed

.openapi-generator/FILES

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ example/opentelemetry/main.go
113113
git_push.sh
114114
go.mod
115115
go.sum
116+
internal/utils/retryutils/retryparams.go
117+
internal/utils/retryutils/retryparams_test.go
116118
internal/utils/retryutils/retryutils.go
117119
internal/utils/retryutils/retryutils_test.go
118120
internal/utils/ulid.go

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ data, err := fgaClient.WriteAssertions(context.Background()).
910910

911911
### Retries
912912

913-
If a network request fails with a 429 or 5xx error from the server, the SDK will automatically retry the request up to 3 times with a minimum wait time of 500 milliseconds between each attempt.
913+
If a network request fails with a 429 or 5xx error from the server, the SDK will automatically retry the request up to 3 times with a minimum wait time of 100 milliseconds between each attempt.
914914

915915
To customize this behavior, create an `openfga.RetryParams` struct and assign values to the `MaxRetry` and `MinWaitInMs` fields. `MaxRetry` determines the maximum number of retries (up to 15), while `MinWaitInMs` sets the minimum wait time between retries in milliseconds.
916916

0 commit comments

Comments
 (0)