{"record":{"id":"5244305e2932c883","repo":"conductor-oss/conductor","slug":"openapi-document-exceeds-the-10-mib-payload-limit","errorCode":null,"errorMessage":"OpenAPI document exceeds the 10 MiB payload limit","messagePattern":"OpenAPI document exceeds the 10 MiB payload limit","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/ListApiToolsTask.java","lineNumber":213,"sourceCode":"                logger.debug(\"Found spec at well-known path: {}\", candidateUrl);\n                return result;\n            }\n        }\n\n        return null;\n    }\n\n    /** Returns a FetchResult if the response is valid JSON, otherwise null. */\n    private FetchResult attemptFetch(String url, Map<String, String> headers) {\n        try {\n            HttpResponse<byte[]> response = sendWithValidatedRedirects(url, headers);\n\n            if (response.statusCode() >= 400) {\n                return null;\n            }\n\n            if (response.body().length > ExternalDataLimits.MAX_PAYLOAD_BYTES) {\n                throw new IllegalArgumentException(\n                        \"OpenAPI document exceeds the 10 MiB payload limit\");\n            }\n            String body = new String(response.body(), java.nio.charset.StandardCharsets.UTF_8);\n            if (body == null || body.isBlank()) {\n                return null;\n            }\n\n            // Quick check — if the response looks like HTML, skip JSON parsing\n            String trimmed = body.stripLeading();\n            if (trimmed.startsWith(\"<\") || trimmed.startsWith(\"<!\")) {\n                return null;\n            }\n\n            JsonNode root = objectMapper.readTree(body);\n            if (root == null || root.isMissingNode()) {\n                return null;\n            }\n            return new FetchResult(url, root);","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/ListApiToolsTask.java#L195-L231","documentation":"Error \"OpenAPI document exceeds the 10 MiB payload limit\" thrown in conductor-oss/conductor.","triggerScenarios":"Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/ListApiToolsTask.java:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Host the OpenAPI document behind a smaller/split spec or reduce it below the 10 MiB limit.","Remove unused paths/schemas from the spec to shrink it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}