aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/Sentry.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/common/Sentry.ts')
-rw-r--r--src/lib/common/Sentry.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/common/Sentry.ts b/src/lib/common/Sentry.ts
index 34bc06f..2792203 100644
--- a/src/lib/common/Sentry.ts
+++ b/src/lib/common/Sentry.ts
@@ -1,10 +1,12 @@
import { RewriteFrames } from '@sentry/integrations';
import * as SentryNode from '@sentry/node';
import { Integrations } from '@sentry/node';
-import config from '../../../config/options.js';
+import type { Config } from '../../../config/Config.js';
export class Sentry {
- public constructor(rootdir: string) {
+ public constructor(rootdir: string, config: Config) {
+ if (config.credentials.sentryDsn === null) throw TypeError('sentryDsn cannot be null');
+
SentryNode.init({
dsn: config.credentials.sentryDsn,
environment: config.environment,