-
-
Couldn't load subscription status.
- Fork 1.7k
Closed
Labels
Meta: Good First IssuePackage: coreIssues related to the Sentry Core SDKIssues related to the Sentry Core SDK
Description
It is stated in develop docs that init should return something, e.g. a disposable or the client that was created.
Currently, we return void. We should align this with the Unified API, as that also has benefits for the user - today, you sometimes have to do this slightly weird thing:
Sentry.init();
const client = Sentry.getClient();
// Need to guard for this always :(
if (client) {
client.addIntegration(...);
}Which would be much nicer as:
const client = Sentry.init();We already always create a client that could be returned (it may be disabled, but this is fine), so this should be easy to do.
timfish
Metadata
Metadata
Assignees
Labels
Meta: Good First IssuePackage: coreIssues related to the Sentry Core SDKIssues related to the Sentry Core SDK