From 80c2f58df2a2430b46c434612593d0d60b5a1726 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Tue, 4 Oct 2022 09:51:37 +0200 Subject: [PATCH] Fix retryCondition `error`. Previously, the full baseQueryResult was passed into the `error` argument. This should fix it to only pass `error` in. --- packages/toolkit/src/query/retry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/query/retry.ts b/packages/toolkit/src/query/retry.ts index c7954bfcc6..ed72b86b34 100644 --- a/packages/toolkit/src/query/retry.ts +++ b/packages/toolkit/src/query/retry.ts @@ -124,7 +124,7 @@ const retryWithBackoff: BaseQueryEnhancer< if ( e instanceof HandledError && - !options.retryCondition(e.value as FetchBaseQueryError, args, { + !options.retryCondition(e.value.error as FetchBaseQueryError, args, { attempt: retry, baseQueryApi: api, extraOptions,