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

/decide endpoint failure due to test tokens #4712

Closed
sentry-io bot opened this issue Jun 11, 2021 · 2 comments · Fixed by #4772
Closed

/decide endpoint failure due to test tokens #4712

sentry-io bot opened this issue Jun 11, 2021 · 2 comments · Fixed by #4772
Assignees
Labels
bug Something isn't working right

Comments

@sentry-io
Copy link

sentry-io bot commented Jun 11, 2021

Sentry Issue: POSTHOG-2V8

AttributeError: 'NoneType' object has no attribute 'startswith'
(1 additional frame(s) were not displayed)
...
  File "django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "newrelic/hooks/framework_django.py", line 563, in wrapper
    return wrapped(*args, **kwargs)
  File "django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "posthog/api/decide.py", line 92, in get_decide
    token, is_test_environment = _clean_token(token)
  File "posthog/api/capture.py", line 103, in _clean_token
    is_test_environment = token.startswith("test_")
@macobo
Copy link
Contributor

macobo commented Jun 11, 2021

cc @buwilliams this seems to be caused by a recent change to accept test tokens. Given this affects /decide endpoint, errors here could lead to data not being captured -> worth prioritizing!

@macobo macobo added bug Something isn't working right core-analytics labels Jun 11, 2021
@macobo macobo changed the title AttributeError: 'NoneType' object has no attribute 'startswith' /decide endpoint failure due to test tokens Jun 11, 2021
@macobo
Copy link
Contributor

macobo commented Jun 15, 2021

Bump - this is leading to data loss, worth taking a look at ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants