You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK implements RFC 9110 compliant retry behavior with support for the `Retry-After` header. By default, the SDK will automatically retry failed requests up to **3 times** with delay calculation (maximum allowable: 15 retries).
1120
-
1121
-
#### Retry Behavior
1122
-
1123
-
**Rate Limiting (429 errors):** Always retried regardless of HTTP method.
1124
-
1125
-
**Server Errors (5xx):** All requests are retried on 5xx errors (except 501 Not Implemented) regardless of HTTP method:
1126
-
-**All operations** (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS): Always retried on 5xx errors with delay calculation
1127
-
1128
-
#### Delay Calculation
1129
-
1130
-
1.**Retry-After header present**: Uses the server-specified delay (supports both integer seconds and HTTP-date formats)
1131
-
2.**No Retry-After header**: Uses exponential backoff with jitter (base delay: 2^retryCount * 100ms, capped at 120 seconds)
1132
-
3.**Minimum delay**: Respects the configured `minimumRetryDelay` as a floor value
1133
-
1134
-
#### Configuration
1135
-
1136
-
Customize retry behavior using the `ClientConfiguration` builder. The SDK enforces a maximum of 15 retries to prevent accidental server overload:
1137
-
1138
-
**⚠️ Breaking Changes:**
1139
-
- Configuration validation now prevents setting `maxRetries` above 15
1140
-
-`FgaError` now exposes the `Retry-After` header value via `getRetryAfterHeader()`
The API Executor provides direct HTTP access to OpenFGA endpoints not yet wrapped by the SDK. It maintains the SDK's client configuration including authentication, telemetry, retries, and error handling.
@@ -1288,6 +1220,77 @@ For a complete working example, see [examples/api-executor](examples/api-executo
1288
1220
See [docs/ApiExecutor.md](docs/ApiExecutor.md) for complete API reference and examples for both `ApiExecutor` and `StreamingApiExecutor`.
1289
1221
1290
1222
1223
+
1224
+
### Retries
1225
+
1226
+
The SDK implements RFC 9110 compliant retry behavior with support for the `Retry-After` header. By default, the SDK will automatically retry failed requests up to **3 times** with delay calculation (maximum allowable: 15 retries).
1227
+
1228
+
#### Retry Behavior
1229
+
1230
+
**Rate Limiting (429 errors):** Always retried regardless of HTTP method.
1231
+
1232
+
**Server Errors (5xx):** All requests are retried on 5xx errors (except 501 Not Implemented) regardless of HTTP method:
1233
+
-**All operations** (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS): Always retried on 5xx errors with delay calculation
1234
+
1235
+
#### Delay Calculation
1236
+
1237
+
1.**Retry-After header present**: Uses the server-specified delay (supports both integer seconds and HTTP-date formats)
1238
+
2.**No Retry-After header**: Uses exponential backoff with jitter (base delay: 2^retryCount * 100ms, capped at 120 seconds)
1239
+
3.**Minimum delay**: Respects the configured `minimumRetryDelay` as a floor value
1240
+
1241
+
#### Configuration
1242
+
1243
+
Customize retry behavior using the `ClientConfiguration` builder. The SDK enforces a maximum of 15 retries to prevent accidental server overload:
1244
+
1245
+
**⚠️ Breaking Changes:**
1246
+
- Configuration validation now prevents setting `maxRetries` above 15
1247
+
-`FgaError` now exposes the `Retry-After` header value via `getRetryAfterHeader()`
0 commit comments