You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Additional context
Thank you for your feature request – we love each and every one!
The text was updated successfully, but these errors were encountered:
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()
, orawait PostHog.build(apiKey, { throwOnError: true })
Describe alternatives you've considered
I tried calling
getAllFlags()
andreloadFeatureFlags()
but they don't throw, and I don't have flags that I can use to check.Related sub-libraries
Additional context
Thank you for your feature request – we love each and every one!
The text was updated successfully, but these errors were encountered: