From fcabc7d22dc1117bb96d38fc241f1332a87bb37f Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Tue, 4 Oct 2022 11:16:18 +0200 Subject: [PATCH] Fix retryCondition `error`. (#2743) --- 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,