Skip to content

Commit 4724e58

Browse files
committed
Handle listening to errors
1 parent 14971f9 commit 4724e58

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

packages/app/src/sandbox/compile.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -747,12 +747,16 @@ async function compile({
747747
}
748748

749749
if (firstLoad) {
750-
metrics.persistMeasurements({
751-
sandboxId,
752-
cacheUsed: usedCache,
753-
browser: navigator.userAgent,
754-
version: VERSION,
755-
});
750+
metrics
751+
.persistMeasurements({
752+
sandboxId,
753+
cacheUsed: usedCache,
754+
browser: navigator.userAgent,
755+
version: VERSION,
756+
})
757+
.catch(() => {
758+
/* Do nothing with the error */
759+
});
756760
}
757761
}
758762
firstLoad = false;

packages/app/src/sandbox/utils/metrics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function persistMeasurements(data: {
115115
cacheUsed: boolean;
116116
browser: string;
117117
version: string;
118-
}) {
118+
}): Promise<Response | void> {
119119
const body = [
120120
{
121121
measurement: 'load_times',

0 commit comments

Comments
 (0)