Skip to content

Commit

Permalink
Ignore errors from event flushing (#2681)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge authored Jan 7, 2025
1 parent 12f25d8 commit d66c184
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-frogs-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': patch
---

Ignore errors from event flushing
3 changes: 3 additions & 0 deletions packages/gitbook/src/components/Insights/InsightsProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ function sendEvents(args: {
body: JSON.stringify({
events,
}),
}).catch((error) => {
// We don't want to throw when this fails.
console.error('Error sending events', error);
});
}

Expand Down

0 comments on commit d66c184

Please sign in to comment.