{"record":{"id":"87b58af09e127abd","repo":"quarkusio/quarkus","slug":"error-decoding-multipart-field-charset-length-wra","errorCode":null,"errorMessage":"Error decoding multipart field charset/length (wrapped IOException)","messagePattern":"Error decoding multipart field charset/length \\(wrapped IOException\\)","errorType":"exception","errorClass":"ErrorDataDecoderException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java","lineNumber":574,"sourceCode":"                    long size;\n                    try {\n                        size = lengthAttribute != null ? Long.parseLong(lengthAttribute\n                                .getValue()) : 0L;\n                    } catch (IOException e) {\n                        throw new ErrorDataDecoderException(e);\n                    } catch (NumberFormatException ignored) {\n                        size = 0;\n                    }\n                    try {\n                        if (size > 0) {\n                            currentAttribute = factory.createAttribute(response,\n                                    cleanString(nameAttribute.getValue()), size);\n                        } else {\n                            currentAttribute = factory.createAttribute(response,\n                                    cleanString(nameAttribute.getValue()));\n                        }\n                    } catch (NullPointerException | IllegalArgumentException | IOException e) {\n                        throw new ErrorDataDecoderException(e);\n                    }\n                    if (localCharset != null) {\n                        currentAttribute.setCharset(localCharset);\n                    }\n                }\n                // load data\n                if (!loadDataMultipartOptimized(undecodedChunk, multipartDataBoundary, currentAttribute)) {\n                    // Delimiter is not found. Need more chunks.\n                    return null;\n                }\n                Attribute finalAttribute = currentAttribute;\n                currentAttribute = null;\n                currentFieldAttributes = null;\n                // ready to load the next one\n                currentStatus = MultiPartStatus.HEADERDELIMITER;\n                return finalAttribute;\n            }\n            case FILEUPLOAD: {","sourceCodeStart":556,"sourceCodeEnd":592,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java#L556-L592","documentation":"After resolving the field name and optional size, the decoder calls factory.createAttribute(...); failures — NullPointerException from a missing name attribute, IllegalArgumentException from an invalid name/size, or IOException reading the value — are wrapped in ErrorDataDecoderException.","triggerScenarios":"A part's Content-Disposition lacks a name= parameter (nameAttribute null → cleanString(null) NPE), or the name/size combination is rejected by the attribute factory, or createAttribute/getValue throws IOException.","commonSituations":"Server emitting parts without name in Content-Disposition; custom HttpDataFactory rejecting oversized fields; corrupted part headers from proxies.","solutions":["Ensure every part's Content-Disposition includes a name= parameter","Check any custom DefaultHttpDataFactory configuration (max sizes) used by the client","Fix sender/proxy corruption of part headers","Catch ErrorDataDecoderException and log the wrapped cause to identify NPE vs IAE vs IOException"],"exampleFix":"// before (part header)\nContent-Disposition: form-data\n// after\nContent-Disposition: form-data; name=\"field1\"","handlingStrategy":"validation","validationCode":"if (!contentDisposition.contains(\"name=\")) {\n    throw new IllegalArgumentException(\"Part missing name parameter: \" + contentDisposition);\n}","typeGuard":null,"tryCatchPattern":"try { decoder.offer(chunk); } catch (ErrorDataDecoderException e) { if (e.getCause() instanceof NullPointerException) { log.error(\"Part without name attribute\"); } }","preventionTips":["Ensure every emitted part has name= in Content-Disposition","Review custom HttpDataFactory size limits","Validate server part headers in integration tests"],"tags":["http","multipart","content-disposition"],"backgroundTag":"missing-multipart-part-name","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}