feat(api): enable Sentry reporting

This commit is contained in:
Oliver Eyton-Williams
2020-03-23 18:31:25 +01:00
committed by Mrugesh Mohapatra
parent 61e5bf942b
commit 10a6622546
7 changed files with 47 additions and 7 deletions

View File

@ -0,0 +1,8 @@
import { Handlers } from '@sentry/node';
import { sentry } from '../../../config/secrets';
export default function sentryRequestHandler() {
return sentry.dns === 'dsn_from_sentry_dashboard'
? (req, res, next) => next()
: Handlers.requestHandler();
}