{"record":{"id":"50dc2919d92ea4e3","repo":"quarkusio/quarkus","slug":"error-decoding-transfer-encoding-value-wrapped-io","errorCode":null,"errorMessage":"Error decoding transfer-encoding value (wrapped IOException)","messagePattern":"Error decoding transfer-encoding value \\(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":879,"sourceCode":"     *\n     * @param delimiter\n     *        the delimiter to use\n     * @return the InterfaceHttpData if any\n     * @throws ErrorDataDecoderException on decoder error\n     */\n    protected InterfaceHttpData getFileUpload(String delimiter) {\n        // eventually restart from existing FileUpload\n        // Now get value according to Content-Type and Charset\n        Attribute encoding = currentFieldAttributes.get(HttpHeaderNames.CONTENT_TRANSFER_ENCODING);\n        Charset localCharset = charset;\n        // Default\n        TransferEncodingMechanism mechanism = TransferEncodingMechanism.BIT7;\n        if (encoding != null) {\n            String code;\n            try {\n                code = encoding.getValue().toLowerCase();\n            } catch (IOException e) {\n                throw new ErrorDataDecoderException(e);\n            }\n            if (code.equals(TransferEncodingMechanism.BIT7.value())) {\n                localCharset = CharsetUtil.US_ASCII;\n            } else if (code.equals(TransferEncodingMechanism.BIT8.value())) {\n                localCharset = CharsetUtil.ISO_8859_1;\n                mechanism = TransferEncodingMechanism.BIT8;\n            } else if (code.equals(TransferEncodingMechanism.BINARY.value())) {\n                // no real charset, so let the default\n                mechanism = TransferEncodingMechanism.BINARY;\n            } else {\n                throw new ErrorDataDecoderException(\"TransferEncoding Unknown: \" + code);\n            }\n        }\n        Attribute charsetAttribute = currentFieldAttributes.get(HttpHeaderValues.CHARSET);\n        if (charsetAttribute != null) {\n            try {\n                localCharset = Charset.forName(charsetAttribute.getValue());\n            } catch (IOException | UnsupportedCharsetException e) {","sourceCodeStart":861,"sourceCodeEnd":897,"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#L861-L897","documentation":"This ErrorDataDecoderException wraps an IOException thrown by Attribute.getValue() while reading the Content-Transfer-Encoding value when setting up a file upload. Reading the attribute value can fail on I/O problems (e.g. underlying disk attribute in some Netty factories), so the transfer-encoding resolution fails and the decode aborts.","triggerScenarios":"getFileUpload() calls encoding.getValue().toLowerCase() on the stored Content-Transfer-Encoding attribute and the underlying attribute read throws IOException.","commonSituations":"Disk-backed attribute factories hitting file I/O errors; temp directory removed mid-decode; permissions/disk-full conditions during large multipart processing.","solutions":["Check the temp/working directory used by the attribute factory exists, is writable, and has free space.","Retry the request; transient I/O failures often resolve on a second attempt.","Configure the factory to use memory-backed attributes for small payloads.","Inspect OS-level issues (disk full, permissions, deleted temp files) reported in the wrapped IOException."],"exampleFix":"// before: default disk attribute factory failing on deleted temp dir\n// after: ensure the temp dir exists before decoding\nFiles.createDirectories(Paths.get(System.getProperty(\"java.io.tmpdir\"), \"quarkus-multipart\"));","handlingStrategy":"try-catch","validationCode":"// Pre-check attribute readability before decode where possible\ntry {\n    encoding.getValue();\n} catch (IOException e) {\n    throw new IllegalStateException(\"Transfer-encoding attribute unreadable: temp storage broken?\", e);\n}","typeGuard":null,"tryCatchPattern":"try {\n    parts = decoder.decodeMultipart(status);\n} catch (ErrorDataDecoderException e) {\n    if (e.getCause() instanceof IOException) {\n        // transient/temp-storage problem: safe to retry once\n        parts = retryDecodeOnce();\n    } else {\n        throw e;\n    }\n}","preventionTips":["Keep the attribute factory's temp directory writable and monitored for space.","Prefer memory-backed attributes for small payloads.","Recreate temp directories at startup (containers wipe /tmp).","Alert on disk-full conditions in the deployment environment."],"tags":["multipart","io-exception","transfer-encoding","resteasy-reactive"],"backgroundTag":"attribute-io-failure","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"}