From 9294150029aa4ba1703b92dbd7d59e216bfbee26 Mon Sep 17 00:00:00 2001 From: Samuel Lippert Date: Wed, 10 Aug 2022 14:19:22 -0500 Subject: [PATCH] Add NEXT_PUBLIC_SENTRY_DSN --- deno_dist/index.ts | 4 ++-- src/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deno_dist/index.ts b/deno_dist/index.ts index 4adbccea..4caeeee3 100644 --- a/deno_dist/index.ts +++ b/deno_dist/index.ts @@ -4,14 +4,14 @@ import type { Handler } from 'https://raw.githubusercontent.com/honojs/hono/v2.0 export const sentry = (): Handler => { return async (c, next) => { // const sentry = new Toucan({ - // dsn: c.env.SENTRY_DSN, + // dsn: c.env.SENTRY_DSN || || c.env.NEXT_PUBLIC_SENTRY_DSN, // request: c.req, // allowedHeaders: ['user-agent'], // allowedSearchParams: /(.*)/, // }) // try { - await next() + await next() // } catch (error) { // sentry.captureException(error) // } diff --git a/src/index.ts b/src/index.ts index 424dfdf7..61ccc962 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import Toucan from 'toucan-js' export const sentry = (): Handler => { return async (c, next) => { const sentry = new Toucan({ - dsn: c.env.SENTRY_DSN, + dsn: c.env.SENTRY_DSN || c.env.NEXT_PUBLIC_SENTRY_DSN, request: c.req, allowedHeaders: ['user-agent'], allowedSearchParams: /(.*)/,