diff --git a/frontend/src/app/sentry/sentry-reporter.ts b/frontend/src/app/sentry/sentry-reporter.ts index 2c87e3ed18..d10564bc19 100644 --- a/frontend/src/app/sentry/sentry-reporter.ts +++ b/frontend/src/app/sentry/sentry-reporter.ts @@ -107,11 +107,15 @@ export class SentryReporter implements ErrorReporter { }); } - public captureException(err:Error) { - if (!this.client) { + public captureException(err:Error|string) { + if (!this.client || !err) { return this.handleOfflineMessage('captureException', Array.from(arguments)); } + if (typeof err === 'string') { + return this.captureMessage(err, 'error'); + } + this.client.withScope((scope:Scope) => { this.setupContext(scope); this.client.captureException(err);