From 4d598979154b9b50a77ae2f0e524af61ba653eec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 7 Nov 2025 11:55:26 +0000 Subject: [PATCH 1/2] Initial plan From 58b4d7e3d2a9c84833ae2ac750fff0dad74d3719 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 7 Nov 2025 12:07:58 +0000 Subject: [PATCH 2/2] Fix json-bigint serialization error when data is not a string Co-authored-by: likui628 <90845831+likui628@users.noreply.github.com> --- playground/src/api/request.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/playground/src/api/request.ts b/playground/src/api/request.ts index e741552dde3..a88553613c1 100644 --- a/playground/src/api/request.ts +++ b/playground/src/api/request.ts @@ -29,11 +29,15 @@ function createRequestClient(baseURL: string, options?: RequestClientOptions) { baseURL, transformResponse: (data: any, header: AxiosResponseHeaders) => { // storeAsString指示将BigInt存储为字符串,设为false则会存储为内置的BigInt类型 - return header.getContentType()?.toString().includes('application/json') - ? cloneDeep( - JSONBigInt({ storeAsString: true, strict: true }).parse(data), - ) - : data; + if ( + header.getContentType()?.toString().includes('application/json') && + typeof data === 'string' + ) { + return cloneDeep( + JSONBigInt({ storeAsString: true, strict: true }).parse(data), + ); + } + return data; }, });