fix: Log errors to console when Sentry not installed

This commit is contained in:
Tom Moor
2020-04-25 19:53:24 -07:00
parent 870b91f17a
commit 187be4737e
5 changed files with 21 additions and 15 deletions

View File

@@ -83,7 +83,9 @@ export class Mailer {
attachments: data.attachments,
});
} catch (err) {
Sentry.captureException(err);
if (process.env.SENTRY_DSN) {
Sentry.captureException(err);
}
throw err; // Re-throw for queue to re-try
}
}