posthog-v7.41.0
Immutable
release. Only release title and notes can be modified.
Minor changes
- 2863909 feat(mcp): emit
$mcp_error_messageand$mcp_error_typeon failed MCP events. The reason a tool call failed previously lived only on the sibling$exceptionevent, so PostHog's failures view — which reads the scalars off the primary event — showed empty error rows for every Python-backed MCP server, and switching offenable_exception_autocaptureremoved the reason entirely. Both values are read from the same$exception_listthe sibling carries, so the two surfaces can never disagree, and the message inherits the existing 2048-character cap.PostHogMCP.capture_tool_call()andcapture_tools_list()take a new optionalerror_typefor custom dispatchers that want a coarse category ("validation","timeout") instead of the thrown class name. Exception messages are also redacted before they leave — previously nothing sanitized the error payload, so the$exceptionsibling had been shipping them raw. Credential-looking words go through the SDK's own detector (entropy, known key formats, PEM markers), per word, so a message likeauth failed for sk-...keeps its diagnostic text and loses only the key. Parity with@posthog/mcp, which sanitizes exception values the same way. — Thanks @gesh!