quarkusio/quarkus · error · ErrorDataDecoderException
No Multipart delimiter found
Error message
No Multipart delimiter found
What it means
findMultipartDelimiter scans the undecoded chunk for the next multipart boundary. If it consumes the chunk without finding the expected '--boundary' delimiter, it resets the reader index and throws ErrorDataDecoderException('No Multipart delimiter found').
Source
Thrown at independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java:699
return null;
}
if (newline.equals(delimiter)) {
currentStatus = dispositionStatus;
return decodeMultipart(dispositionStatus);
}
if (newline.equals(delimiter + "--")) {
// CLOSEDELIMITER or MIXED CLOSEDELIMITER found
currentStatus = closeDelimiterStatus;
if (currentStatus == MultiPartStatus.HEADERDELIMITER) {
// MIXEDCLOSEDELIMITER
// end of the Mixed part
currentFieldAttributes = null;
return decodeMultipart(MultiPartStatus.HEADERDELIMITER);
}
return null;
}
undecodedChunk.readerIndex(readerIndex);
throw new ErrorDataDecoderException("No Multipart delimiter found");
}
/**
* Find the next Disposition
*
* @return the next InterfaceHttpData if any
* @throws ErrorDataDecoderException
*/
private InterfaceHttpData findMultipartDisposition() {
int readerIndex = undecodedChunk.readerIndex();
if (currentStatus == MultiPartStatus.DISPOSITION) {
currentFieldAttributes = new TreeMap<>(CaseIgnoringComparator.INSTANCE);
}
// read many lines until empty line with newline found! Store all data
while (!skipOneLine()) {
String newline;
try {
skipControlCharacters(undecodedChunk);View on GitHub (pinned to e1c734241f)
Solutions
- Compare the boundary in the response Content-Type with the actual delimiters in the body and fix the server/proxy mismatch
- Disable any body-rewriting (compression, charset transcoding) between server and client
- Verify the response body really is multipart before decoding
- Catch ErrorDataDecoderException and fall back to raw body handling
Example fix
// before (server) Content-Type: multipart/mixed; boundary=A body delimiters: --B // after Content-Type: multipart/mixed; boundary=B
Defensive patterns
Strategy: try-catch
Validate before calling
String boundary = extractBoundary(response.headers().get(HttpHeaderNames.CONTENT_TYPE));
if (boundary != null && !bodyContains("--" + boundary)) { /* body/header mismatch: don't decode */ } Try / catch
try { decoder.offer(chunk); } catch (ErrorDataDecoderException e) { if (e.getMessage().contains("No Multipart delimiter")) { /* fall back to raw body */ } } Prevention
- Keep body rewriting (compression/transcoding) disabled between server and client
- Assert boundary consistency in integration tests
- Verify the response is truly multipart before decoding
When it happens
Trigger: The stream contains data that does not match the boundary declared in the response Content-Type — e.g. boundary changed mid-stream, body is not actually multipart despite the header, or the boundary line is corrupted.
Common situations: Proxy/gateway rewriting the body but not the boundary; server using a different boundary than advertised; binary corruption (compression/charset translation) of the body; response is actually not multipart.
Related errors
- Unable to parse multipart response - No delimiter specified
- Cannot create a Encoder if request is a TRACE
- Needs a boundary value
- No 'Content-Type' header present.
- Illegal charset in multipart response Content-Type (wrapped)
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/cdbacac807266f58.
Report an issue: GitHub.