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: Handle DSN qs and show better error messages #2639

Merged
merged 1 commit into from Jun 4, 2020
Merged

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Jun 3, 2020

@kamilogorek fix tests plz

@getsentry-bot
Copy link
Contributor

Warnings
⚠️ Please add a changelog entry for your changes.
Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 16.9883 kB) (ES6: 16.0391 kB)

📖 ✅ TSLint passed

Generated by 🚫 dangerJS against 4c0260f

@kamilogorek kamilogorek removed their request for review June 4, 2020 10:19
@kamilogorek kamilogorek merged commit dcab5ef into master Jun 4, 2020
@kamilogorek kamilogorek deleted the better-dsn branch June 4, 2020 10:36
@Mnkras
Copy link

Mnkras commented Jun 8, 2020

Just a heads up, this check broke some stuff we were doing with proxying requests.
We were using the projectid to route to different endpoints, and use strings that aren't only numbers.

@Ilko89BG
Copy link

Ilko89BG commented Jun 9, 2020

(node:43) UnhandledPromiseRejectionWarning: SentryError: Invalid Dsn: Invalid projectId sentry
This what we have been getting after the release - I believe it has to do with this check!

@mitsuhiko
Copy link
Member

@Ilko89BG can you share the DSN you're using?

@mitsuhiko
Copy link
Member

So generally this has only been supported as an accident by this SDK. If you want to do something like this for routing where you cannot use an integer it would be better to use the path segment of a DSN which is supported.

So if you have https://key@server.tld/foobar as DSN you could use https://key@server.tld/foobar/1 instead (and use the 1 as a dummy project id).

@Ilko89BG
Copy link

Ilko89BG commented Jun 9, 2020

@Ilko89BG can you share the DSN you're using?

'http://sentry@localhost/sentry'

So generally this has only been supported as an accident by this SDK. If you want to do something like this for routing where you cannot use an integer it would be better to use the path segment of a DSN which is supported.

So if you have https://key@server.tld/foobar as DSN you could use https://key@server.tld/foobar/1 instead (and use the 1 as a dummy project id).

Ok will try

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.

None yet

6 participants