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

Stop throwing errors if no results (yet) #27765

Open
jurajmajerik opened this issue Jan 22, 2025 · 0 comments
Open

Stop throwing errors if no results (yet) #27765

jurajmajerik opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working right feature/experimentation Feature Tag: Experimentation team/experiments

Comments

@jurajmajerik
Copy link
Contributor

jurajmajerik commented Jan 22, 2025

Bug Description

Currently, if the experiment results could not be calculated due to missing events, we throw the following error with the response code 400 BAD REQUEST:

"[ErrorDetail(string='{"no-events": true, "no-flag-info": true, "no-control-variant": true, "no-test-variant": true}', code='no-results')]"

This is a relic of the old calculation API. In the absence of experiment results, we shouldn’t throw an error, as nothing is necessarily broken - there are simply missing events. We should return a success response with a descriptive status code and a status message.

This logic lives in experiment_trends_query_runner.py and experiments_funnels_query_runner.py

Additional context

Debug info

- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables or https://eu.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
@jurajmajerik jurajmajerik added bug Something isn't working right feature/experimentation Feature Tag: Experimentation team/experiments labels Jan 22, 2025
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 feature/experimentation Feature Tag: Experimentation team/experiments
Projects
None yet
Development

No branches or pull requests

1 participant