From d9927f98fe47cf524dad8fb4aaab5bd1d981162c Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Tue, 19 Nov 2024 15:27:03 -0700 Subject: [PATCH] HACK: debug env --- redwood.toml | 50 +++++++++++++++++++++---------------------- web/src/lib/sentry.ts | 2 ++ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/redwood.toml b/redwood.toml index 2a81d86..fadc102 100644 --- a/redwood.toml +++ b/redwood.toml @@ -6,35 +6,35 @@ # https://redwoodjs.com/docs/app-configuration-redwood-toml [web] - title = "Freevite" - port = 8910 - apiUrl = "${API_URL:/.netlify/functions}" - includeEnvironmentVariables = [ - 'SITE_HOST', +title = "Freevite" +port = 8910 +apiUrl = "${API_URL:/.netlify/functions}" +includeEnvironmentVariables = [ + 'SITE_HOST', - 'SENTRY_DSN', + 'SENTRY_DSN', - # Netlify: https://docs.netlify.com/configure-builds/environment-variables - 'CONTEXT', - 'DEPLOY_PRIME_URL', + # Netlify: https://docs.netlify.com/configure-builds/environment-variables + 'CONTEXT', + 'DEPLOY_PRIME_URL', - # Email - 'FROM_EMAIL', - 'SMTP_HOST', - 'SMTP_PORT', - 'SMTP_USER', - 'SMTP_PASS', + # Email + 'FROM_EMAIL', + 'SMTP_HOST', + 'SMTP_PORT', + 'SMTP_USER', + 'SMTP_PASS', - # S3 - 'S3_REGION', - 'S3_BUCKET', - 'S3_NAMESPACE', - 'S3_USER', - 'S3_PASS', - ] + # S3 + 'S3_REGION', + 'S3_BUCKET', + 'S3_NAMESPACE', + 'S3_USER', + 'S3_PASS', +] [api] - port = 8911 +port = 8911 [browser] - open = true +open = true [notifications] - versionUpdates = ["latest"] +versionUpdates = ["latest"] diff --git a/web/src/lib/sentry.ts b/web/src/lib/sentry.ts index 1bf3051..096d8f3 100644 --- a/web/src/lib/sentry.ts +++ b/web/src/lib/sentry.ts @@ -3,6 +3,8 @@ import * as Sentry from '@sentry/react' let dsn = '' let environment = 'development' +console.log({ env: process.env }) + if (typeof process === 'undefined' || !process.env?.SENTRY_DSN) { console.error( 'Missing SENTRY_DSN environment variable. Did you forget to add it to ' +