{"record":{"id":"b9fe002dac640188","repo":"conductor-oss/conductor","slug":"a2a-call-method-to-endpoint-failed-message","errorCode":null,"errorMessage":"A2A call '{method}' to {endpoint} failed: {message}","messagePattern":"A2A call '(.+?)' to (.+?) failed: (.+?)","errorType":"exception","errorClass":"A2AException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/a2a/A2AService.java","lineNumber":411,"sourceCode":"                JsonNode json = parseBody(response, body);\n                if (json.has(\"error\") && !json.get(\"error\").isNull()) {\n                    throw jsonRpcError(endpoint, method, json.get(\"error\"));\n                }\n                if (!json.has(\"result\")) {\n                    throw new A2AException(\n                            \"Invalid JSON-RPC response from \"\n                                    + endpoint\n                                    + \" for '\"\n                                    + method\n                                    + \"': missing 'result' field\");\n                }\n                return json.get(\"result\");\n            }\n        } catch (A2AException | NonRetryableException e) {\n            throw e;\n        } catch (Exception e) {\n            // IO/timeout/parse errors are transient — let the task retry.\n            throw new A2AException(\n                    \"A2A call '\" + method + \"' to \" + endpoint + \" failed: \" + e.getMessage(), e);\n        }\n    }\n\n    private JsonNode parseBody(Response response, String body) throws Exception {\n        String contentType = response.header(\"Content-Type\", \"application/json\");\n        if (contentType != null && contentType.contains(\"text/event-stream\")) {\n            return parseSseResponse(body);\n        }\n        return objectMapper.readTree(body);\n    }\n\n    /**\n     * Guards against SSRF: rejects URLs whose hostname resolves to an RFC-1918 address, loopback,\n     * link-local (169.254.x.x — AWS/GCP/Azure metadata), or any non-http(s) scheme.\n     *\n     * <p>Note: DNS resolution is performed once here. A sufficiently hostile DNS server could\n     * rebind the name to a private IP after this check (TOCTOU). For stronger protection, deploy","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/a2a/A2AService.java#L393-L429","documentation":"Thrown by A2AService.jsonRpc() as a catch-all for any unexpected exception during a JSON-RPC call that is not already an A2AException or NonRetryableException. Covers IO errors, timeouts, SSL issues, and JSON parsing failures. It is a retryable A2AException so the Conductor task will be retried.","triggerScenarios":"Any exception during the JSON-RPC POST — connection refused, read timeout, SSL handshake failure, JSON parse error on the response body, etc. — that isn't handled by the explicit A2AException/NonRetryableException re-throw or the HTTP error / JSON-RPC error branches.","commonSituations":"The remote agent is down or unreachable. DNS resolution fails for the agent hostname. The response body is not valid JSON. Connection pool exhaustion. Firewall rules block the outbound request.","solutions":["Check network connectivity and DNS resolution for the agent endpoint","Verify the remote agent is running and accepting connections","Retry — this is a transient/retryable error","Check for firewall or network policy rules blocking outbound traffic to the agent","If the response body is invalid JSON, verify the agent endpoint returns proper JSON-RPC responses"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-flight check: validate the URL and test basic connectivity\ntry {\n    a2aService.validateAgentUrl(endpoint);\n} catch (NonRetryableException e) {\n    throw e; // non-retryable, fail immediately\n}","typeGuard":null,"tryCatchPattern":"try {\n    A2ATask task = a2aService.getTask(endpoint, taskId, historyLength, headers);\n} catch (A2AException e) {\n    // Transient error — Conductor will retry the task\n    log.warn(\"A2A JSON-RPC call failed (will retry): {}\", e.getMessage());\n    throw e;\n} catch (NonRetryableException e) {\n    // Terminal error — do not retry\n    log.error(\"A2A JSON-RPC call failed (terminal): {}\", e.getMessage());\n    throw e;\n}","preventionTips":["Monitor network connectivity between Conductor and remote agents","Set appropriate retry policies in the A2A worker task definitions","Implement health checks for remote agent endpoints","Use DNS caching and connection pooling to reduce transient failures"],"tags":["a2a","network","json-rpc","retryable"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}