Rocky_Mountain_Vending/.pnpm-store/v10/files/9b/71525d92dcd3ba7e8f2fd6b44d00ce5f1787b9e9fd50d8337e05e4be1a793552f53ad90ecdfecb3e98c78eebce271c2f830076afa46063c15f2a6ec32b35ce
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

40 lines
1 KiB
Text

import { consoleSandbox, getClient, debug } from '@sentry/core';
import { DEBUG_BUILD } from '../debug-build.js';
const DEFAULT_SHUTDOWN_TIMEOUT = 2000;
/**
* @hidden
*/
function logAndExitProcess(error) {
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.error(error);
});
const client = getClient();
if (client === undefined) {
DEBUG_BUILD && debug.warn('No NodeClient was defined, we are exiting the process now.');
global.process.exit(1);
return;
}
const options = client.getOptions();
const timeout =
options?.shutdownTimeout && options.shutdownTimeout > 0 ? options.shutdownTimeout : DEFAULT_SHUTDOWN_TIMEOUT;
client.close(timeout).then(
(result) => {
if (!result) {
DEBUG_BUILD && debug.warn('We reached the timeout for emptying the request buffer, still exiting now!');
}
global.process.exit(1);
},
error => {
DEBUG_BUILD && debug.error(error);
},
);
}
export { logAndExitProcess };
//# sourceMappingURL=errorhandling.js.map