From c8f2dbfcbcd4f582f00787fb423a8b816e3d662e Mon Sep 17 00:00:00 2001 From: Brenley Dueck Date: Sun, 2 Nov 2025 22:44:30 -0600 Subject: [PATCH 1/3] fix(solid-query): ignore error if data undefined so can redirect --- packages/solid-query/src/useBaseQuery.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/solid-query/src/useBaseQuery.ts b/packages/solid-query/src/useBaseQuery.ts index d312e95f385..66751d3c3bd 100644 --- a/packages/solid-query/src/useBaseQuery.ts +++ b/packages/solid-query/src/useBaseQuery.ts @@ -47,9 +47,9 @@ function reconcileFn( if (error instanceof Error) { console.warn( `Unable to correctly reconcile data for query key: ${queryHash}. ` + - `Possibly because the query data contains data structures that aren't supported ` + - `by the 'structuredClone' algorithm. Consider using a callback function instead ` + - `to manage the reconciliation manually.\n\n Error Received: ${error.name} - ${error.message}`, + `Possibly because the query data contains data structures that aren't supported ` + + `by the 'structuredClone' algorithm. Consider using a callback function instead ` + + `to manage the reconciliation manually.\n\n Error Received: ${error.name} - ${error.message}`, ) } } @@ -156,7 +156,7 @@ export function useBaseQuery< const query = observer().getCurrentQuery() const unwrappedResult = hydratableObserverResult(query, result) - if (unwrappedResult.isError) { + if (result.data !== undefined && unwrappedResult.isError) { reject(unwrappedResult.error) unsubscribeIfQueued() } else { From 1557f3e3f4d8463bcd735808a1bcdd7f35f6bffe Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 04:48:34 +0000 Subject: [PATCH 2/3] ci: apply automated fixes --- packages/solid-query/src/useBaseQuery.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/solid-query/src/useBaseQuery.ts b/packages/solid-query/src/useBaseQuery.ts index 66751d3c3bd..637f69dc3fa 100644 --- a/packages/solid-query/src/useBaseQuery.ts +++ b/packages/solid-query/src/useBaseQuery.ts @@ -47,9 +47,9 @@ function reconcileFn( if (error instanceof Error) { console.warn( `Unable to correctly reconcile data for query key: ${queryHash}. ` + - `Possibly because the query data contains data structures that aren't supported ` + - `by the 'structuredClone' algorithm. Consider using a callback function instead ` + - `to manage the reconciliation manually.\n\n Error Received: ${error.name} - ${error.message}`, + `Possibly because the query data contains data structures that aren't supported ` + + `by the 'structuredClone' algorithm. Consider using a callback function instead ` + + `to manage the reconciliation manually.\n\n Error Received: ${error.name} - ${error.message}`, ) } } From a6069f54b671601213cd5a4684769e38dee85c77 Mon Sep 17 00:00:00 2001 From: Brenley Dueck Date: Sun, 2 Nov 2025 22:49:55 -0600 Subject: [PATCH 3/3] add changset --- .changeset/green-lands-occur.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/green-lands-occur.md diff --git a/.changeset/green-lands-occur.md b/.changeset/green-lands-occur.md new file mode 100644 index 00000000000..2570f4c3f50 --- /dev/null +++ b/.changeset/green-lands-occur.md @@ -0,0 +1,5 @@ +--- +'@tanstack/solid-query': patch +--- + +Skip errors if returned data is undefined