Open History to see the last commit
1---
2id: QueryErrorResetBoundary
3title: QueryErrorResetBoundary
4---
5β
6When using **suspense** or **throwOnError** in your queries, you need a way to let queries know that you want to try again when re-rendering after some error occurred. With the `QueryErrorResetBoundary` component you can reset any query errors within the boundaries of the component.
7β
8```tsx
9import { QueryErrorResetBoundary } from '@tanstack/react-query'
10import { ErrorBoundary } from 'react-error-boundary'
11β
12const App = () => (
13 <QueryErrorResetBoundary>
14 {({ reset }) => (
15 <ErrorBoundary
16 onReset={reset}
17 fallbackRender={({ resetErrorBoundary }) => (
18 <div>
19 There was an error!
20 <Button onClick={() => resetErrorBoundary()}>Try again</Button>
21 </div>
22 )}
23 >
24 <Page />
25 </ErrorBoundary>
26 )}
27 </QueryErrorResetBoundary>
28)
29```