From a1d14c7c69a43f4f90d77a807e0a3ac0c51fd6ef Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Sat, 3 Sep 2022 01:49:19 -0400 Subject: [PATCH] Ignore empty SENTRY_DSN --- src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index 1059b65..3e22791 100644 --- a/src/server.ts +++ b/src/server.ts @@ -348,7 +348,7 @@ export const cacheWrapper = async ( const sentryWrapper = async (event: FetchEvent, test = false): Promise => { let sentry: null | Toucan = null; - if (typeof SENTRY_DSN !== 'undefined' && !test) { + if (typeof SENTRY_DSN !== 'undefined' && SENTRY_DSN && !test) { /* We use Toucan for Sentry. Toucan is a Sentry SDK designed for Cloudflare Workers / DOs */ sentry = new Toucan({ dsn: SENTRY_DSN,