Rocky_Mountain_Vending/.pnpm-store/v10/files/fb/7c5383815e3731fa83fef7af4eefb34c116d1d575ca4deda0733b45be69a31e580ef25e897a77d565e954e3afba6d1dd105699e9ff8f7720cc1a6d5d500e30
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

66 lines
1.7 KiB
Text

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const util = require('node:util');
const core = require('@sentry/core');
const INTEGRATION_NAME = 'NodeSystemError';
function isSystemError(error) {
if (!(error instanceof Error)) {
return false;
}
if (!('errno' in error) || typeof error.errno !== 'number') {
return false;
}
// Appears this is the recommended way to check for Node.js SystemError
// https://github.com/nodejs/node/issues/46869
return util.getSystemErrorMap().has(error.errno);
}
/**
* Captures context for Node.js SystemError errors.
*/
const systemErrorIntegration = core.defineIntegration((options = {}) => {
return {
name: INTEGRATION_NAME,
processEvent: (event, hint, client) => {
if (!isSystemError(hint.originalException)) {
return event;
}
const error = hint.originalException;
const errorContext = {
...error,
};
if (!client.getOptions().sendDefaultPii && options.includePaths !== true) {
delete errorContext.path;
delete errorContext.dest;
}
event.contexts = {
...event.contexts,
node_system_error: errorContext,
};
for (const exception of event.exception?.values || []) {
if (exception.value) {
if (error.path && exception.value.includes(error.path)) {
exception.value = exception.value.replace(`'${error.path}'`, '').trim();
}
if (error.dest && exception.value.includes(error.dest)) {
exception.value = exception.value.replace(`'${error.dest}'`, '').trim();
}
}
}
return event;
},
};
});
exports.systemErrorIntegration = systemErrorIntegration;
//# sourceMappingURL=systemError.js.map