Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validating the posthog connection #372

Open
1 of 4 tasks
aqeelat opened this issue Feb 4, 2025 · 0 comments
Open
1 of 4 tasks

Validating the posthog connection #372

aqeelat opened this issue Feb 4, 2025 · 0 comments
Labels
enhancement New feature or request nodejs

Comments

@aqeelat
Copy link

aqeelat commented Feb 4, 2025

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

Additional context

Thank you for your feature request – we love each and every one!

@aqeelat aqeelat added the enhancement New feature or request label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request nodejs
Projects
None yet
Development

No branches or pull requests

2 participants