{"record":{"id":"3ce5ee6a5242f13a","repo":"conductor-oss/conductor","slug":"no-data-found-in-sse-response-ssebody","errorCode":null,"errorMessage":"No data found in SSE response: {sseBody}","messagePattern":"No data found in SSE response: (.+?)","errorType":"exception","errorClass":"A2AException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/a2a/A2AService.java","lineNumber":573,"sourceCode":"    }\n\n    /**\n     * Parses an SSE response, concatenating the JSON from {@code data:} lines (some A2A agents\n     * reply to non-streaming calls with {@code text/event-stream}).\n     */\n    private JsonNode parseSseResponse(String sseBody) throws Exception {\n        StringBuilder jsonData = new StringBuilder();\n        for (String line : sseBody.split(\"\\n\")) {\n            String trimmed = line.trim();\n            if (trimmed.startsWith(\"data:\")) {\n                String data = trimmed.substring(5).trim();\n                if (!data.isEmpty() && !data.equals(\"[DONE]\")) {\n                    jsonData.append(data);\n                }\n            }\n        }\n        if (jsonData.length() == 0) {\n            throw new A2AException(\"No data found in SSE response: \" + truncate(sseBody));\n        }\n        return objectMapper.readTree(jsonData.toString());\n    }\n\n    /** Accumulates A2A streaming events into a single task (or direct message) result. */\n    private static final class StreamAggregator {\n\n        private String id;\n        private String contextId;\n        private TaskStatus status;\n        private final Map<String, Artifact> artifacts = new LinkedHashMap<>();\n        private A2AMessage message;\n        private boolean done;\n\n        void accept(JsonNode result, ObjectMapper objectMapper) {\n            String kind = result.path(\"kind\").asText(\"\");\n            if (\"status-update\".equals(kind)) {\n                mergeIds(result);","sourceCodeStart":555,"sourceCodeEnd":591,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/a2a/A2AService.java#L555-L591","documentation":"Thrown by A2AService.parseSseResponse() when the SSE response body contains no 'data:' lines with actual content. This method is used when a non-streaming JSON-RPC call receives a text/event-stream content-type, and the code attempts to extract JSON from SSE data lines. Zero data lines means no parseable content was found.","triggerScenarios":"A JSON-RPC call (not a streaming call) receives a 200 OK with Content-Type: text/event-stream, but the body has no lines starting with 'data:' or all data lines are empty or '[DONE]'. parseSseResponse() is called and jsonData remains empty.","commonSituations":"The remote agent incorrectly returns text/event-stream for a non-streaming request but sends only comment lines or event-type lines without data. The agent sends an SSE keep-alive or preamble without actual data. The agent has a bug in its SSE serialization for JSON-RPC responses.","solutions":["Inspect the truncated SSE body in the exception message to understand what the agent sent","Verify the remote agent properly formats SSE data lines for JSON-RPC-over-SSE responses","If the agent should return plain JSON, check why it sets Content-Type to text/event-stream","Retry — transient empty responses may occur during agent warmup or reconnection"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// If you control the remote agent, ensure it returns proper SSE data lines\n// with 'data:' prefix for JSON-RPC-over-SSE responses","typeGuard":null,"tryCatchPattern":"try {\n    JsonNode result = a2aService.jsonRpc(endpoint, method, params, headers);\n} catch (A2AException e) {\n    if (e.getMessage().contains(\"No data found in SSE response\")) {\n        // The agent returned text/event-stream but no data lines\n        log.warn(\"A2A agent returned empty SSE response (will retry): {}\", e.getMessage());\n    }\n    throw e;\n}","preventionTips":["Verify remote agents correctly format SSE responses with 'data:' lines","Test agent endpoints with curl to inspect raw SSE output","If the agent should return plain JSON, ensure Content-Type is application/json, not text/event-stream","Report formatting bugs to the agent provider"],"tags":["a2a","sse","protocol-violation","retryable"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}