MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / formatEventRejection

Function formatEventRejection

static/sentry.ts:63–76  ·  view source on GitHub ↗
(evt: Event)

Source from the content-addressed store, hash-verified

61}
62
63function formatEventRejection(evt: Event): string {
64 const targetName = evt.target?.constructor?.name ?? 'unknown';
65 let message = `Event rejection: type="${evt.type}", target="${targetName}"`;
66
67 if ('detail' in evt && evt.detail !== undefined) {
68 try {
69 message += `, detail=${JSON.stringify(evt.detail)}`;
70 } catch {
71 message += ', detail=[Unserializable]';
72 }
73 }
74
75 return message;
76}
77
78export function SetupSentry() {
79 if (options.statusTrackingEnabled && options.sentryDsn) {

Callers 1

SetupSentryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected