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: /(.*)/,