()
| 6 | let sentryInitDone = false; |
| 7 | |
| 8 | function 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 | |
| 24 | export function errorHandler(error: Error, extras?: { [key: string]: any }) { |
| 25 | console.error(error); |
no test coverage detected