Open
Description
Is your feature request related to a problem?
In Node, in order to make sure we don't have an incorrect api key, it would be great if we can have an async function that checks that our sdk was initialized correctly.
Describe the solution you'd like
maybe await (new PostHog(apiKey)).validate()
, or await PostHog.build(apiKey, { throwOnError: true })
Describe alternatives you've considered
I tried calling getAllFlags()
and reloadFeatureFlags()
but they don't throw, and I don't have flags that I can use to check.
Related sub-libraries
- All of them
- posthog-web
- posthog-node
- posthog-react-native