reduxjs/redux-toolkit

retryCondition() in retry() in version 2.2.4 no longer type checks

tristanls opened this issue · 2 comments

Types work fine in 2.2.3 for the following:

import { retry } from "@reduxjs/toolkit/query/react";

const myRetry = retry(
    ...,
    {
        retryCondition: (error, args, ...) =>
           ...
    }
);

In version 2.2.3 the type of error is FetchBaseQueryError.
In version 2.2.4 the type of error is unknown.

this is intentional, and noted in the release notes - previously it was giving you FetchBaseQueryError even if you were using a base query with a different error shape.

Thank you. Apologies, I couldn't find release notes for some reason. I see them now.