Skip to content

/decide endpoint failure due to test tokens #4712

@sentry-io

Description

@sentry-io

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_")

Metadata

Metadata

Labels

bugSomething isn't working right

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions