Skip to content

Commit 45bc31f

Browse files
Merge pull request #44 from viamrobotics/RSDK-11186-remove-throw-on-error
Remove throwOnError from usePolling
2 parents 9f94e38 + b85cc2a commit 45bc31f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.changeset/bitter-cougars-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@viamrobotics/svelte-sdk': patch
3+
---
4+
5+
Remove throwOnError from usePolling

src/lib/hooks/use-polling.svelte.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ export function usePolling(
2424
}
2525

2626
const poll = async () => {
27-
await queryClient.refetchQueries(
28-
{ queryKey: key },
29-
{ throwOnError: true }
30-
);
27+
await queryClient.refetchQueries({ queryKey: key });
3128
timeoutId = setTimeout(poll, currentInterval);
3229
};
3330

0 commit comments

Comments
 (0)