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

Check that DSN is binary before trying URI.parse #348

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

mathiasose
Copy link
Contributor

I was setting up Sentry with DSN read from env, and got some crashes when the required variable was not set, because URI.parse was being called with nil, which doesn't match.

To fix this and get a nicer warning message instead of an exception (like #218), I added a is_binary guard in Sentry.Client.get_dsn. Plus a couple of tests to verify that it works as intended.

@mitchellhenke
Copy link
Contributor

Thank you for the contribution (and tests)! 💖

@mitchellhenke mitchellhenke merged commit d941a29 into getsentry:master Jun 3, 2019
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.

2 participants