From dd176c5113ba4a4bbb0a7b13530751b283647310 Mon Sep 17 00:00:00 2001 From: detailswes <97790157+Abishek-Newar@users.noreply.github.com> Date: Fri, 23 Jan 2026 17:22:59 +0530 Subject: [PATCH 1/2] feat: Socket automatic retry as the same of that of python-sdk --- common.ts | 4 ++-- tests/client.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.ts b/common.ts index f48c28ef..239dbe9e 100644 --- a/common.ts +++ b/common.ts @@ -281,8 +281,8 @@ export const createRequestFunction = function (axiosArgs: RequestArgs, axiosInst configuration.isValid(); const retryParams = axiosArgs.options?.retryParams ? axiosArgs.options?.retryParams : configuration.retryParams; - const maxRetry: number = retryParams?.maxRetry ?? 0; - const minWaitInMs: number = retryParams?.minWaitInMs ?? 0; + const maxRetry: number = retryParams?.maxRetry ?? SdkConstants.DefaultMaxRetry; + const minWaitInMs: number = retryParams?.minWaitInMs ?? SdkConstants.DefaultMinWaitInMs; const start = performance.now(); diff --git a/tests/client.test.ts b/tests/client.test.ts index 77119cfb..3666c2e9 100644 --- a/tests/client.test.ts +++ b/tests/client.test.ts @@ -1703,7 +1703,7 @@ describe("OpenFGA Client", () => { user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", object: "workspace:1", relations: ["admin", "guest", "reader", "viewer"], - }); + }, { retryParams: { maxRetry: 0 } }); } catch (err) { expect(scope0.isDone()).toBe(true); expect(scope1.isDone()).toBe(true); From 70ae60768292bd921ddf00b963feb82bf2a90f13 Mon Sep 17 00:00:00 2001 From: Abishek Newar <97790157+Abishek-Newar@users.noreply.github.com> Date: Tue, 24 Feb 2026 04:56:46 +0530 Subject: [PATCH 2/2] changes acc to comments --- tests/helpers/nocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helpers/nocks.ts b/tests/helpers/nocks.ts index 11e73a15..f75245b1 100644 --- a/tests/helpers/nocks.ts +++ b/tests/helpers/nocks.ts @@ -287,4 +287,4 @@ export const getNocks = ((nock: typeof Nock) => ({ .put(`/stores/${storeId}/assertions/${modelId}`) .reply(responseStatus); }, -})); +})); \ No newline at end of file