MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getEventDescription

Function getEventDescription

packages/core/src/utils/misc.ts:67–81  ·  view source on GitHub ↗
(event: Event)

Source from the content-addressed store, hash-verified

65 * @returns event's description
66 */
67export function getEventDescription(event: Event): string {
68 const { message, event_id: eventId } = event;
69 if (message) {
70 return message;
71 }
72
73 const firstException = getFirstException(event);
74 if (firstException) {
75 if (firstException.type && firstException.value) {
76 return `${firstException.type}: ${firstException.value}`;
77 }
78 return firstException.type || firstException.value || eventId || '<unknown>';
79 }
80 return eventId || '<unknown>';
81}
82
83/**
84 * Adds exception values, type and value to an synthetic Exception.

Callers 5

misc.test.tsFile · 0.90
_shouldDropEventFunction · 0.90
_getEventFilterUrlFunction · 0.90

Calls 1

getFirstExceptionFunction · 0.85

Tested by

no test coverage detected