Skip to content

Commit a6f9ca5

Browse files
committed
fix(url): use delete to clear SENTRY_URL for Node.js compatibility
process.env.SENTRY_URL = undefined sets the string "undefined" in Node.js (Bun handles it correctly). Use delete with a biome-ignore to truly unset the env var when a SaaS URL is detected.
1 parent 71ddebe commit a6f9ca5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/sentry-url-parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ export function applySentryUrlContext(baseUrl: string): void {
133133
if (isSentrySaasUrl(baseUrl)) {
134134
// Clear any self-hosted URL so API calls fall back to default SaaS routing.
135135
// Without this, a stale SENTRY_URL would route SaaS requests to the wrong host.
136-
process.env.SENTRY_URL = undefined;
136+
// biome-ignore lint/performance/noDelete: process.env requires delete to truly unset; assignment coerces to string in Node.js
137+
delete process.env.SENTRY_URL;
137138
return;
138139
}
139140
process.env.SENTRY_URL = baseUrl;

0 commit comments

Comments
 (0)