We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f94e38 commit f96b59cCopy full SHA for f96b59c
.changeset/bitter-cougars-enjoy.md
@@ -0,0 +1,5 @@
1
+---
2
+'@viamrobotics/svelte-sdk': patch
3
4
+
5
+Remove throwOnError from usePolling
src/lib/hooks/use-polling.svelte.ts
@@ -1,4 +1,4 @@
-import { useQueryClient } from '@tanstack/svelte-query';
+import { CancelledError, useQueryClient } from '@tanstack/svelte-query';
/**
* Polls a query at an interval while waiting for
@@ -24,10 +24,7 @@ export function usePolling(
24
}
25
26
const poll = async () => {
27
- await queryClient.refetchQueries(
28
- { queryKey: key },
29
- { throwOnError: true }
30
- );
+ await queryClient.refetchQueries({ queryKey: key });
31
timeoutId = setTimeout(poll, currentInterval);
32
};
33
0 commit comments