Skip to content

Commit

Permalink
Add catch and log of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Feb 6, 2025
1 parent e73228c commit 0d260fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hooks/useDebounceEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const useIntervalDebounceEffect = (

try {
await callback();
} catch (error) {
console.error('Error during refetch:', error);
} finally {
if (!done) {
latestTimer = setTimeout(inner, delay);

Check warning on line 29 in hooks/useDebounceEffect.ts

View check run for this annotation

Codecov / codecov/patch

hooks/useDebounceEffect.ts#L19-L29

Added lines #L19 - L29 were not covered by tests
Expand Down

0 comments on commit 0d260fb

Please sign in to comment.