Skip to content

Commit b01faac

Browse files
committed
Catch failed to post tracking errors (#5065)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving error handling in the `track.ts` file by catching errors during tracking operations to prevent them from being reported to error services. ### Detailed summary - Modified the promise chain in `track.ts` to catch errors by adding a `.catch(() => {});` statement. - Updated the changelog in `changeset/rotten-weeks-raise.md` to reflect the change in error handling for tracking operations. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent ef6b4f4 commit b01faac

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rotten-weeks-raise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Catch failed to post tracking errors to avoid exposing them to error report services

packages/thirdweb/src/analytics/track.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ function track(client: ThirdwebClient, data: object) {
6363
}
6464
return value;
6565
}),
66-
});
66+
}).catch(() => {});
6767
}

0 commit comments

Comments
 (0)