Skip to content

Commit 3f40bd7

Browse files
Harry Wayepull[bot]
authored andcommitted
chore(capture): log errors for 503 cause in get_event (PostHog#13434)
Previously we just returned 503 status code, but we don't know the reason for the 503.
1 parent 59c060d commit 3f40bd7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

posthog/api/capture.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,10 @@ def get_event(request):
300300
event, distinct_id, ip, site_url, now, sent_at, team_id, event_uuid, token
301301
) # type: ignore
302302
)
303-
except Exception as e:
304-
capture_exception(e, {"data": data})
303+
except Exception as exc:
304+
capture_exception(exc, {"data": data})
305305
statsd.incr("posthog_cloud_raw_endpoint_failure", tags={"endpoint": "capture"})
306+
logger.error("kafka_produce_failure", exc_info=exc)
306307
return cors_response(
307308
request,
308309
generate_exception_response(

0 commit comments

Comments
 (0)