Skip to content

Commit

Permalink
feat(api): capture exception
Browse files Browse the repository at this point in the history
  • Loading branch information
djabarovgeorge committed Dec 3, 2024
1 parent 3407f84 commit 1091c79
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
Instrument,
InstrumentUsecase,
} from '@novu/application-generic';
import { captureException } from '@sentry/node';
import { PreviewStep, PreviewStepCommand } from '../../../bridge/usecases/preview-step';
import { FrameworkPreviousStepsOutputState } from '../../../bridge/usecases/preview-step/preview-step.command';
import { BuildStepDataUsecase } from '../build-step-data';
Expand Down Expand Up @@ -76,6 +77,10 @@ export class GeneratePreviewUsecase {
LOG_CONTEXT
);

if (process.env.SENTRY_DSN) {
captureException(error);
}

return {
result: {
preview: {},
Expand Down

0 comments on commit 1091c79

Please sign in to comment.