Skip to content

Commit 1737efe

Browse files
authored
fix: don't send FS events for non-errors (#100)
1 parent fa682bb commit 1737efe

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/integration.ts

+21-21
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,29 @@ export function fullStoryIntegration(
4242
console.error(`Unable to get FullStory session URL: ${reason}`);
4343
}
4444
}
45-
}
4645

47-
if (fullStoryUrl) {
48-
event.contexts = {
49-
...event.contexts,
50-
fullStory: {
51-
fullStoryUrl,
52-
},
53-
};
54-
}
46+
if (fullStoryUrl) {
47+
event.contexts = {
48+
...event.contexts,
49+
fullStory: {
50+
fullStoryUrl,
51+
},
52+
};
53+
}
5554

56-
try {
57-
fullStoryClient.event('Sentry Error', {
58-
sentryUrl: getSentryUrl({
59-
baseSentryUrl: baseSentryUrl,
60-
sentryOrg,
61-
hint,
62-
client,
63-
}),
64-
...getOriginalExceptionProperties(hint),
65-
});
66-
} catch (e) {
67-
console.debug('Unable to report sentry error details to FullStory');
55+
try {
56+
fullStoryClient.event('Sentry Error', {
57+
sentryUrl: getSentryUrl({
58+
baseSentryUrl: baseSentryUrl,
59+
sentryOrg,
60+
hint,
61+
client,
62+
}),
63+
...getOriginalExceptionProperties(hint),
64+
});
65+
} catch (e) {
66+
console.debug('Unable to report sentry error details to FullStory');
67+
}
6868
}
6969

7070
return event;

0 commit comments

Comments
 (0)