Skip to content

Commit

Permalink
gen files for server batch check API
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Jan 8, 2025
1 parent 24f8188 commit 536bef3
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
.github/ISSUE_TEMPLATE/config.yaml
.github/ISSUE_TEMPLATE/feature_request.yaml
.github/dependabot.yaml
.github/workflows/main.yaml
.github/workflows/semgrep.yaml
.gitignore
.gitignore
.madgerc
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ yarn add @openfga/sdk

We strongly recommend you initialize the `OpenFgaClient` only once and then re-use it throughout your app, otherwise you will incur the cost of having to re-initialize multiple times or at every request, the cost of reduced connection pooling and re-use, and would be particularly costly in the client credentials flow, as that flow will be performed on every request.

> The `OpenFgaClient` will by default retry API requests up to 15 times on 429 and 5xx errors.
> The `OpenFgaClient` will by default retry API requests up to 3 times on 429 and 5xx errors.
#### No Credentials

Expand Down Expand Up @@ -446,7 +446,7 @@ const result = await fgaClient.check({
##### Batch Check

Run a set of [checks](#check). Batch Check will return `allowed: false` if it encounters an error, and will return the error in the body.
If 429s or 5xxs are encountered, the underlying check will retry up to 15 times before giving up.
If 429s or 5xxs are encountered, the underlying check will retry up to 3 times before giving up.

```javascript
const options = {
Expand Down Expand Up @@ -667,7 +667,7 @@ const response = await fgaClient.writeAssertions([{

### Retries

If a network request fails with a 429 or 5xx error from the server, the SDK will automatically retry the request up to 15 times with a minimum wait time of 100 milliseconds between each attempt.
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.

To customize this behavior, create an object with `maxRetry` and `minWaitInMs` properties. `maxRetry` determines the maximum number of retries (up to 15), while `minWaitInMs` sets the minimum wait time between retries in milliseconds.

Expand Down
Loading

0 comments on commit 536bef3

Please sign in to comment.