Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node): remove new URL usage in Undici integration #8147

Merged
merged 1 commit into from May 17, 2023

Conversation

AbhiPrasad
Copy link
Member

fixes #8145

It seems that there are some scenarios where you can pass in an invalid URL to fetch, which breaks our integrations. For example, a URL like http://a-url-that-no-exists.com// (notice the double slashes at the end).

Not sure if this is something Node needs to fix, but for now we need to fix to make sure we don't crash users.

Big thanks to @Lms24 for the suggestion to use parseUrl!

@AbhiPrasad AbhiPrasad requested review from a team, stephanie-anderson and Lms24 and removed request for a team May 17, 2023 10:55
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 21.03 KB (+0.03% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 65.63 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.57 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 58.09 KB (+0.02% 🔺)
@sentry/browser - Webpack (gzipped + minified) 21.17 KB (0%)
@sentry/browser - Webpack (minified) 69.04 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.19 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 49.12 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.65 KB (+0.03% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.89 KB (+0.04% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 48.18 KB (+1.2% 🔺)
@sentry/replay - Webpack (gzipped + minified) 42.06 KB (+1.45% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 67.15 KB (+0.97% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.05 KB (+1.13% 🔺)

@AbhiPrasad AbhiPrasad merged commit 23a1697 into develop May 17, 2023
42 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-undici-bad-url branch May 17, 2023 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: Invalid URL is thrown from the Undici integration
2 participants