{"record":{"id":"f17468ac522c17e9","repo":"quarkusio/quarkus","slug":"unsupported-multipart-response-element-type-h","errorCode":null,"errorMessage":"Unsupported multipart response element type: \" + httpData.getClass()","messagePattern":"Unsupported multipart response element type: \" \\+ httpData\\.getClass\\(\\)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientResponseCompleteRestHandler.java","lineNumber":178,"sourceCode":"    }\n\n    private static EntityPart nettyPartToEntityPart(InterfaceHttpData httpData, Serialisers serialisers) throws IOException {\n        String name = httpData.getName();\n        String fileName = null;\n        InputStream content;\n        MediaType mediaType;\n        MultivaluedMap<String, String> headers = new QuarkusMultivaluedHashMap<>();\n\n        if (httpData instanceof FileUpload fu) {\n            fileName = fu.getFilename();\n            String ct = fu.getContentType();\n            mediaType = ct != null ? MediaType.valueOf(ct) : MediaType.APPLICATION_OCTET_STREAM_TYPE;\n            content = new ByteArrayInputStream(fu.get());\n        } else if (httpData instanceof Attribute at) {\n            mediaType = MediaType.TEXT_PLAIN_TYPE;\n            content = new ByteArrayInputStream(at.getValue().getBytes(StandardCharsets.UTF_8));\n        } else {\n            throw new IllegalArgumentException(\n                    \"Unsupported multipart response element type: \" + httpData.getClass());\n        }\n\n        headers.putSingle(\"Content-Type\", mediaType.toString());\n        headers.putSingle(\"Content-Disposition\", EntityPartImpl.buildContentDisposition(name, fileName));\n\n        return new EntityPartImpl(name, fileName, headers, mediaType, content, serialisers);\n    }\n\n}\n","sourceCodeStart":160,"sourceCodeEnd":189,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientResponseCompleteRestHandler.java#L160-L189","documentation":"nettyPartToEntityPart converts a single Netty multipart part into a client EntityPart. It supports FileUpload and Attribute; any other InterfaceHttpData subtype cannot be converted and throws IllegalArgumentException listing the concrete class.","triggerScenarios":"Reading a multipart response as List<EntityPart> where the parsed parts include a Netty data type other than FileUpload/Attribute (e.g. InternalAttribute from non-standard multipart framing).","commonSituations":"Server or intermediary emitting malformed/extra boundary or preamble parts; gateways rewriting multipart content; unusual Content-Type headers causing Netty's decoder to produce internal attribute parts.","solutions":["Inspect the raw multipart response (curl/logging) and correct the server or proxy to emit standard multipart/form-data parts.","Ensure the response Content-Type multipart boundary/header is well-formed so Netty parses only real parts.","Consume the body as raw String/InputStream and parse manually if the producer cannot be fixed.","Upgrade Quarkus — part-parsing robustness changes across Netty/RESTEasy Reactive versions may alter behavior."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Fall back to raw-body consumption when part types are uncertain","Validate producer's multipart framing with curl before wiring the client","Pin/upgrade Quarkus and Netty versions for improved parsing"],"tags":["rest-client","multipart","netty","entitypart"],"backgroundTag":"unsupported-multipart-part-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}