RTK Query infinite query docs expose `isFetchNextPageError`, but React hook does not

Author: raghurama-somayajiCreated Aug 31, 2026Updated Sep 11, 2026
LabelsRTK-Query

Description

The RTK Query infinite query documentation lists isFetchNextPageError and isFetchPreviousPageError as return values of the generated React infinite query hook.

However, the actual useInfiniteQuery React hook implementation/types do not expose these properties.

Documentation

The official documentation lists:

typescript
isFetchingNextPage: boolean
isFetchingPreviousPage: boolean
isFetchNextPageError: boolean
isFetchPreviousPageError: boolean

See:

https://redux-toolkit.js.org/rtk-query/api/created-api/hooks

Reproduction

Using @reduxjs/[email protected]:

typescript
const {
  isFetchingNextPage,
  isFetchNextPageError,
} = api.useGetSomethingInfiniteQuery(arg);

TypeScript reports:

Property 'isFetchNextPageError' does not exist on type
'UseInfiniteQueryStateDefaultResult<...>'.

Source

UseInfiniteQueryStateBaseResult currently exposes:

typescript
hasNextPage: boolean;
hasPreviousPage: boolean;
isFetchingNextPage: boolean;
isFetchingPreviousPage: boolean;

but does not expose:

typescript
isFetchNextPageError: boolean;
isFetchPreviousPageError: boolean;

The generated React hook returns queryStateResults together with fetchNextPage, fetchPreviousPage, and refetch, but does not add these error flags separately.

Expected behavior

Either:

  1. isFetchNextPageError / isFetchPreviousPageError should be exposed by the React infinite-query hook as documented, or
  2. The API documentation should be corrected if these flags are not intended to be part of the public hook result.

Environment

  • @reduxjs/toolkit: 2.12.0
  • RTK Query
  • React generated infinite query hooks
  • TypeScript

This is particularly useful for infinite-scroll UIs where an error loading the next page needs to be distinguished from an error loading the initial page.