@sentry/core
Version:
Base implementation for all Sentry JavaScript SDKs
22 lines (21 loc) • 712 B
JavaScript
// src/utils/eventUtils.ts
function isInternalException(hint) {
return hint.data?.__sentry__ === true;
}
/**
* Get a list of possible event messages from a Sentry event.
*/
function getPossibleEventMessages(event) {
const possibleMessages = [];
if (event.message) possibleMessages.push(event.message);
try {
const lastException = event.exception.values[event.exception.values.length - 1];
if (lastException?.value) {
possibleMessages.push(lastException.value);
if (lastException.type) possibleMessages.push(`${lastException.type}: ${lastException.value}`);
}
} catch {}
return possibleMessages;
}
export { getPossibleEventMessages, isInternalException };
//# sourceMappingURL=eventUtils.js.map