Skip to content

Commit

Permalink
chore: change funnel errors to ExposedHogQLError (#24822)
Browse files Browse the repository at this point in the history
  • Loading branch information
aspicer authored Sep 11, 2024
1 parent cf98baf commit b2e8300
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit b2e8300

Please sign in to comment.