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 **15 times** with intelligent delay calculation.
968
+
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 intelligent delay calculation (maximum allowable: 15 retries).
969
969
970
970
#### Retry Behavior
971
971
@@ -978,12 +978,17 @@ The SDK implements RFC 9110 compliant retry behavior with support for the `Retry
978
978
#### Delay Calculation
979
979
980
980
1. **Retry-After header present**: Uses the server-specified delay (supports both integer seconds and HTTP-date formats)
981
-
2. **No Retry-After header**: Uses exponential backoff with jitter (base delay: 2^retryCount * 500ms, capped at 120 seconds)
981
+
2. **No Retry-After header**: Uses exponential backoff with jitter (base delay: 2^retryCount * 100ms, capped at 120 seconds)
982
982
3. **Minimum delay**: Respects the configured `minimumRetryDelay` as a floor value
983
983
984
984
#### Configuration
985
985
986
-
Customize retry behavior using the `ClientConfiguration` builder:
986
+
Customize retry behavior using the `ClientConfiguration` builder. The SDK enforces a maximum of 15 retries to prevent accidental server overload:
987
+
988
+
**⚠️ Breaking Changes:**
989
+
- State-affecting operations (POST, PUT, PATCH, DELETE) now only retry 5xx errors when a `Retry-After` header is present
990
+
- Configuration validation now prevents setting `maxRetries` above 15
991
+
- `FgaError` now exposes the `Retry-After` header value via `getRetryAfterHeader()`
0 commit comments