:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(llma): fall back to plain text when XML parsing fails in trace viewer (#59761)
okxint788d1546453f
diff --git a/products/llm_analytics/frontend/ConversationDisplay/XMLViewer.tsx b/products/llm_analytics/frontend/ConversationDisplay/XMLViewer.tsxindex 138788353844..4680d718e31c 100644--- a/products/llm_analytics/frontend/ConversationDisplay/XMLViewer.tsx+++ b/products/llm_analytics/frontend/ConversationDisplay/XMLViewer.tsx@@ -18,7 +18,9 @@ export function XMLViewer({ children: xmlContent, collapsed = 3 }: XMLViewerPropconst parsedXML = parseXML(xmlContent)if (!parsedXML) {- return <span className="font-mono whitespace-pre-wrap text-danger">Invalid XML content</span>+ // Content looks like XML but isn't valid (e.g. markdown with embedded HTML tags).+ // Render as plain text instead of surfacing a confusing parse error to the user.+ return <span className="font-mono whitespace-pre-wrap">{xmlContent}</span>}return (