Calling `Sentry.init()` with empty dsn doesn't throw error
See original GitHub issue- Review the documentation: https://docs.sentry.io/platforms/javascript/electron/
- Search for existing issues: https://github.com/getsentry/sentry-electron/issues
- Use the latest release: https://github.com/getsentry/sentry-electron/releases
Versions + Platform
- SDK version -
@sentry/electron@v^2.5.0
- Electron version -
electron@v9.4.4
- Platform - macOS`
Description
If I call Sentry.init({ dsn: "" })
then no error is thrown but instead the follow log line is logged to console.error
: SentryError: Attempted to enable Electron native crash reporter but no DSN was supplied
.
This is because of the forget
call at https://github.com/getsentry/sentry-electron/blob/edd2775048d4658f88fd23a989574da913e6762a/src/main/backend.ts#L101
That function really shouldn’t be async
at all since it includes 0 await
’s and two forget
’s itself.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
No way to tell when Sentry.init() is complete #1612 - GitHub
Reading the docs, and some of the code, I cant see a way to tell when Sentry.init() is complete. This is making it...
Read more >Troubleshooting for JavaScript - Sentry Documentation
If you're seeing errors with the message “Non-Error exception (or promise rejection) captured with keys: x, y, z.”, this happens when you a)...
Read more >PHP SDK not sending errors to Sentry when invoked from IBM ...
In OpenWhisk we never shut down as we run in a never-ending loop until the Docker container is killed. Update: You can now...
Read more >getsentry/dotnet - Gitter
Setting it to "" doesn't work. I can try string.Empty ... Installed Sentry v1.1.2, and called the Sentry init() function (with the appropriate...
Read more >Integrated error tracking compatibility with Sentry SDK - GitLab
The Python SDK sends the payload with GZIP compression. This can be identified through the Content-Encoding: gzip header. However, GitLab does not appear...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can validate a DSN something like this:
If you set it to a invalid sdn then I believe it does throw. Would you be willing to expose a validation function then?