Uploaded image for project: 'LLM AI Integration'
  1. LLM AI Integration
  2. LLMAI-227

MCP transport error responses expose Java stack traces to the client

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0.1
    • 1.0.0
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      The MCP SDK's stateless servlet transport serializes its McpError exception object through the JSON mapper when it rejects a request at the transport level (unsupported Content-Type, missing Accept header, malformed JSON-RPC body, handler failure).

      With a default Jackson mapper the response body is a serialized exception of about 20 KB, including the full stack trace with SDK and XWiki class names and line numbers, instead of a JSON-RPC error object. 

      Present since the SDK was first integrated, not a 2.1.0 regression.

      Upstream PR for this issue already existed. 

      Attachments

        Activity

          People

            ppantiru Paul Pantiru
            ppantiru Paul Pantiru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: