{"record":{"id":"91b0522a4dcdeb10","repo":"quarkusio/quarkus","slug":"no-supported-messagebodyreader-found","errorCode":null,"errorMessage":"No supported MessageBodyReader found","messagePattern":"No supported MessageBodyReader found","errorType":"http","errorClass":"NotSupportedException","httpStatus":415,"severity":"error","filePath":"independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/RequestDeserializeHandler.java","lineNumber":108,"sourceCode":"                                    serialisers)\n                                    .proceed();\n                        }\n                    } catch (NoContentException e) {\n                        throw new BadRequestException(e);\n                    }\n                } catch (Exception e) {\n                    log.debug(\"Error occurred during deserialization of input\", e);\n                    requestContext.handleException(e, true);\n                    requestContext.resume();\n                    return;\n                }\n                requestContext.setRequestEntity(result);\n                requestContext.resume();\n                return;\n            }\n        }\n        log.debugv(\"No matching MessageBodyReader found for type {0} and media type {1}\", type, effectiveRequestType);\n        throw new NotSupportedException(\"No supported MessageBodyReader found\");\n    }\n\n    private boolean isReadable(MessageBodyReader<?> reader, ResteasyReactiveRequestContext requestContext,\n            MediaType requestType) {\n        if (reader instanceof ServerMessageBodyReader) {\n            return ((ServerMessageBodyReader<?>) reader).isReadable(type, genericType,\n                    requestContext.getTarget().getLazyMethod(),\n                    requestType);\n        }\n        return reader.isReadable(type, genericType, getAnnotations(requestContext), requestType);\n    }\n\n    @SuppressWarnings(\"unchecked\")\n    public Object readFrom(MessageBodyReader<?> reader, ResteasyReactiveRequestContext requestContext, MediaType requestType)\n            throws IOException {\n        requestContext.requireCDIRequestScope();\n        if (reader instanceof ServerMessageBodyReader) {\n            return ((ServerMessageBodyReader<?>) reader).readFrom((Class) type, genericType, requestType, requestContext);","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/RequestDeserializeHandler.java#L90-L126","documentation":"Thrown as NotSupportedException when no registered MessageBodyReader can deserialize the request body into the declared parameter type for the effective request media type. The reader set is consulted via isReadable(type, genericType, annotations, mediaType) and none matched.","triggerScenarios":"POST/PUT body whose Content-Type has no matching reader for the target Java type, e.g. JSON sent to a method expecting a type without a Jackson ObjectMapper registration, or a custom type with no Provider; sending application/xml when only JSON binding is on the classpath.","commonSituations":"Missing quarkus-rest-jackson (or other serializer) dependency; sending multipart/CSV/plain text for a POJO; custom types needing a custom MessageBodyReader that was never registered; wrong Content-Type header on the client.","solutions":["Add the matching binding extension (e.g. quarkus-rest-jackson) or fix the client Content-Type to match available readers","Register a custom MessageBodyReader for the type with @Provider","Annotate the endpoint parameter with a supported type or accept String/InputStream and parse manually","Verify the entity type is a supported concrete class (interfaces/generics may not resolve)"],"exampleFix":"// before: no reader for MyDto as application/json\n@POST\npublic void create(MyDto dto) { ... }\n// after: add dependency\n// <dependency>io.quarkus:quarkus-rest-jackson</dependency>\n// and ensure Content-Type: application/json on the request","handlingStrategy":"type-guard","validationCode":"if (!isReadableFor(type, contentType)) return Response.status(415).build();","typeGuard":"static boolean hasReader(Class<?> type, MediaType mt) {\n    return readers.stream().anyMatch(r -> r.isReadable(type, type, new java.lang.annotation.Annotation[0], mt));\n}","tryCatchPattern":"try { return resource.post(body); } catch (NotSupportedException e) { if (e.getMessage().contains(\"MessageBodyReader\")) { /* add binding extension or custom reader */ } throw e; }","preventionTips":["Include quarkus-rest-jackson or equivalent for JSON bodies","Register @Provider MessageBodyReader for custom types","Keep client Content-Type aligned with the endpoint's expected type"],"tags":["resteasy-reactive","messagebodyreader","deserialization","http-415"],"backgroundTag":"no-message-body-reader","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"}