-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
I noticed that use can pass the type of error to the ReactQueryProviderConfig interface, however the ReactQueryConfigProvider does not except the TError so it sets the error in config to be Error (the default).
const reactQueryConfig: ReactQueryProviderConfig<AxiosError> = {
refetchAllOnWindowFocus: false,
refetchOnWindowFocus: false,
retry: (failureCount, error) => {
if (error.response?.status === 404) {
return false;
}
return failureCount > 2;
},
};<ReactQueryConfigProvider
config={reactQueryConfig}
>
...
</ReactQueryConfigProvider>I am getting a type error when trying to use a AxiosError in the config.
Shouldn't the ReactQueryConfigProvider take in the Error Type?
<ReactQueryConfigProvider<AxiosError>
config={reactQueryConfig}
>
...
</ReactQueryConfigProvider>michaelhettmer and thebuilder
