Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.emit = function(errorMessageKey, error) {
const event = {
message: ERROR_MESSAGES[errorMessageKey] || errorMessageKey,
extra: { error }
};
isProduction ? Sentry.captureEvent(event) : console.log(event);
};
report(userFeedback: string, feedbackCategory: string, userEmail?: string): Promise {
sentry.captureEvent(
{message: userFeedback, user: {email: userEmail}, tags: {category: feedbackCategory}});
return Promise.resolve();
}
}