From 7ac365ea846046eb905a4a2fe2aff67381c1dd9f Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Wed, 27 Nov 2024 11:33:23 -0800 Subject: [PATCH] fix(sdk-js): Avoid retrying 402s (#2554) --- libs/sdk-js/package.json | 2 +- libs/sdk-js/src/utils/async_caller.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/sdk-js/package.json b/libs/sdk-js/package.json index e1ce9e4ed..ded99a00b 100644 --- a/libs/sdk-js/package.json +++ b/libs/sdk-js/package.json @@ -1,6 +1,6 @@ { "name": "@langchain/langgraph-sdk", - "version": "0.0.28", + "version": "0.0.29", "description": "Client library for interacting with the LangGraph API", "type": "module", "packageManager": "yarn@1.22.19", diff --git a/libs/sdk-js/src/utils/async_caller.ts b/libs/sdk-js/src/utils/async_caller.ts index d58823ba4..d5de9131a 100644 --- a/libs/sdk-js/src/utils/async_caller.ts +++ b/libs/sdk-js/src/utils/async_caller.ts @@ -4,6 +4,7 @@ import PQueueMod from "p-queue"; const STATUS_NO_RETRY = [ 400, // Bad Request 401, // Unauthorized + 402, // Payment required 403, // Forbidden 404, // Not Found 405, // Method Not Allowed