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

chore: change funnel errors to ExposedHogQLError #24822

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions posthog/clickhouse/client/execute_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sentry_sdk
import structlog
from prometheus_client import Histogram
from rest_framework.exceptions import NotFound
from rest_framework.exceptions import NotFound, APIException

from posthog import celery, redis
from posthog.clickhouse.client.async_task_chain import add_task_to_on_commit
Expand Down Expand Up @@ -198,7 +198,7 @@ def execute_process_query(
raise
except Exception as err:
query_status.results = None # Clear results in case they are faulty
if isinstance(err, ExposedHogQLError | ExposedCHQueryError) or is_staff_user:
if isinstance(err, APIException | ExposedHogQLError | ExposedCHQueryError) or is_staff_user:
# We can only expose the error message if it's a known safe error OR if the user is PostHog staff
query_status.error_message = str(err)
logger.exception("Error processing query async", team_id=team_id, query_id=query_id, exc_info=True)
Expand Down
Loading