posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

feat: Warn user when calling .init with an invalid token

Open danielthedifficult opened this issue 3 years ago • 0 comments

Current behavior:

Calling .init with a token value that is undefined (as in my case, a .env var what wasn't being set properly), the JS PostHog library doesn't error, and doesn't call the loaded method/callback (fails silently)

Expected behavior:

Posthog library should warn if token or api_host URL parameters are undefined/null.

danielthedifficult avatar Aug 24 '22 14:08 danielthedifficult