Remove collection of unhandled exception error messages from telemetry (#585)

This commit is contained in:
Dominic White
2026-06-30 04:22:06 +02:00
committed by GitHub
parent 69e82f0258
commit f554523378
3 changed files with 5 additions and 9 deletions
+3 -3
View File
@@ -820,10 +820,10 @@ def main() -> None:
asyncio.run(run_tui(args)) asyncio.run(run_tui(args))
except KeyboardInterrupt: except KeyboardInterrupt:
exit_reason = "interrupted" exit_reason = "interrupted"
except Exception as e: except Exception:
exit_reason = "error" exit_reason = "error"
posthog.error("unhandled_exception", str(e)) posthog.error("unhandled_exception")
scarf.error("unhandled_exception", str(e)) scarf.error("unhandled_exception")
raise raise
finally: finally:
report_state = get_global_report_state() report_state = get_global_report_state()
+1 -3
View File
@@ -123,8 +123,6 @@ def end(report_state: "ReportState", exit_reason: str = "completed") -> None:
) )
def error(error_type: str, error_msg: str | None = None) -> None: def error(error_type: str) -> None:
props = {**base_props(), "error_type": error_type} props = {**base_props(), "error_type": error_type}
if error_msg:
props["error_msg"] = error_msg
_send("error", props) _send("error", props)
+1 -3
View File
@@ -129,12 +129,10 @@ def end(report_state: ReportState, exit_reason: str = "completed") -> None:
) )
def error(error_type: str, error_msg: str | None = None) -> None: def error(error_type: str) -> None:
props: dict[str, Any] = { props: dict[str, Any] = {
**base_props(), **base_props(),
"session": SESSION_ID, "session": SESSION_ID,
"error_type": error_type, "error_type": error_type,
} }
if error_msg:
props["error_msg"] = error_msg
_send("error", props) _send("error", props)