{"record":{"id":"da504414614dfa09","repo":"quarkusio/quarkus","slug":"route-business-method-returning-a-uni-multi-comple","errorCode":null,"errorMessage":"Route business method returning a Uni/Multi/CompletionStage must declare a type argument on the return type [method: %s, bean: %s]","messagePattern":"Route business method returning a Uni/Multi/CompletionStage must declare a type argument on the return type \\[method: (.+?), bean: (.+?)\\]","errorType":"exception","errorClass":"java.lang.IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java","lineNumber":551,"sourceCode":"        if (params.isEmpty()) {\n            if (method.returnType().kind() == Kind.VOID && params.isEmpty()) {\n                throw new IllegalStateException(String.format(\n                        \"Route method that returns void must accept at least one injectable parameter [method: %s, bean: %s]\",\n                        method, bean));\n            }\n        } else {\n            AnnotationValue typeValue = routeAnnotation.value(VALUE_TYPE);\n            Route.HandlerType handlerType = typeValue == null\n                    ? Route.HandlerType.NORMAL\n                    : Route.HandlerType.from(typeValue.asEnum());\n\n            DotName returnTypeName = method.returnType().name();\n\n            if ((returnTypeName.equals(DotNames.UNI)\n                    || returnTypeName.equals(DotNames.MULTI)\n                    || returnTypeName.equals(DotNames.COMPLETION_STAGE))\n                    && method.returnType().kind() == Kind.CLASS) {\n                throw new IllegalStateException(String.format(\n                        \"Route business method returning a Uni/Multi/CompletionStage must declare a type argument on the return type [method: %s, bean: %s]\",\n                        method, bean));\n            }\n            boolean canEndResponse = false;\n            int idx = 0;\n            int failureParams = 0;\n            for (Type paramType : params) {\n                Set<AnnotationInstance> paramAnnotations = Annotations.getParameterAnnotations(transformedAnnotations,\n                        method, idx);\n                List<ParameterInjector> injectors = getMatchingInjectors(paramType, paramAnnotations, index);\n                if (injectors.isEmpty()) {\n                    throw new IllegalStateException(String.format(\n                            \"No parameter injector found for parameter %s of route method %s declared on %s\", idx,\n                            method, bean));\n                }\n                if (injectors.size() > 1) {\n                    throw new IllegalStateException(String.format(\n                            \"Multiple parameter injectors found for parameter %s of route method %s declared on %s\",","sourceCodeStart":533,"sourceCodeEnd":569,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java#L533-L569","documentation":"Raised by ReactiveRoutesProcessor.validateRouteMethod when a route method's declared return type is a raw Uni, Multi or CompletionStage. The processor needs the generic type argument to pick the response serializer and to generate the handler bytecode; a raw type (Kind.CLASS with no type arguments) leaves the element type unknown, so validation aborts at build time with the offending method and bean names.","triggerScenarios":"Thrown at extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java:551 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Declare the type argument, e.g. Uni<String> or Multi<MyItem> instead of a raw Uni","Check that the returned type is not erased by generics misuse or an intermediary raw type","Use a concrete payload type that has an available response body writer"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}