Skip to content

Commit

Permalink
Fix retryCondition error.
Browse files Browse the repository at this point in the history
Previously, the full baseQueryResult was passed into the `error` argument. This should fix it to only pass `error` in.
  • Loading branch information
phryneas authored Oct 4, 2022
1 parent 7611078 commit 80c2f58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/toolkit/src/query/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 80c2f58

Please sign in to comment.