MCPcopy Create free account
hub / github.com/vercel/vercel / initSentry

Function initSentry

api/_lib/util/error-handler.ts:8–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6let sentryInitDone = false;
7
8function initSentry() {
9 if (sentryInitDone) {
10 return;
11 }
12
13 sentryInitDone = true;
14
15 init({
16 // Cannot figure out what's going wrong here. VSCode resolves this fine. But when we build it blows up.
17 // @ts-ignore
18 dsn: assertEnv('SENTRY_DSN'),
19 environment: process.env.NODE_ENV || 'production',
20 release: `${serviceName}`,
21 });
22}
23
24export function errorHandler(error: Error, extras?: { [key: string]: any }) {
25 console.error(error);

Callers 1

errorHandlerFunction · 0.85

Calls 2

initFunction · 0.90
assertEnvFunction · 0.90

Tested by

no test coverage detected