We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9d5099 commit 50d2daeCopy full SHA for 50d2dae
sentry_sdk/integrations/launchdarkly.py
@@ -40,12 +40,14 @@ def __init__(self, ld_client=None):
40
@staticmethod
41
def setup_once():
42
# type: () -> None
43
+ integration = sentry_sdk.get_client().get_integration(LaunchDarklyIntegration)
44
+ if integration is None:
45
+ raise DidNotEnable("LaunchDarkly client is not initialized.")
46
+
47
scope = sentry_sdk.get_current_scope()
48
scope.add_error_processor(flag_error_processor)
-
49
# Register the flag collection hook with the LD client.
- client = sentry_sdk.get_client().get_integration(LaunchDarklyIntegration).client
- client.add_hook(LaunchDarklyHook())
50
+ integration.client.add_hook(LaunchDarklyHook())
51
52
53
class LaunchDarklyHook(Hook):
0 commit comments