{"record":{"id":"c272df45181b3eb8","repo":"quarkusio/quarkus","slug":"unhandled-type-type","errorCode":null,"errorMessage":"Unhandled type: ${type}","messagePattern":"Unhandled type: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/MicroProfileRestClientEnricher.java","lineNumber":997,"sourceCode":"                }\n            }).collect(Collectors.toList());\n\n            AssignableResultHandle headerList = fillHeader.createVariable(List.class);\n            fillHeader.assign(headerList, fillHeader.loadNull());\n            if (headerFillerInfos.size() == 1) {\n                HeaderFillerInfo headerFillerInfo = headerFillerInfos.get(0);\n                ResultHandle headerFillerResult = headerFillerInfo.getResultHandleSupplier().get();\n                BytecodeCreator notNullBranchTrue = fillHeader.ifNotNull(headerFillerResult).trueBranch();\n                Type headerFillerMethodReturnType = headerFillerInfo.getValueType();\n                if (isStringArray(headerFillerMethodReturnType)) {\n                    // repack array to list\n                    ResultHandle asList = notNullBranchTrue.invokeStaticMethod(ARRAYS_AS_LIST, headerFillerResult);\n                    notNullBranchTrue.assign(headerList, asList);\n                } else if (isString(headerFillerMethodReturnType)) {\n                    notNullBranchTrue.assign(headerList, Gizmo.newArrayList(notNullBranchTrue, 1));\n                    notNullBranchTrue.invokeInterfaceMethod(LIST_ADD_METHOD, headerList, headerFillerResult);\n                } else {\n                    throw new IllegalStateException(\"Unhandled type: \" + headerFillerMethodReturnType);\n                }\n            } else {\n                ResultHandle nonNullValuesList = Gizmo.newArrayList(fillHeader, headerFillerInfos.size());\n                for (HeaderFillerInfo headerFillerInfo : headerFillerInfos) {\n                    if (!isString(headerFillerInfo.getValueType())) {\n                        throw new IllegalStateException(\"Unhandled type: \" + headerFillerInfo.getValueType());\n                    }\n                    ResultHandle value = headerFillerInfo.getResultHandleSupplier().get();\n                    BytecodeCreator notNullBranch = fillHeader.ifNotNull(value).trueBranch();\n                    notNullBranch.invokeInterfaceMethod(LIST_ADD_METHOD, nonNullValuesList, value);\n                }\n                ResultHandle sb = fillHeader.newInstance(MethodDescriptor.ofConstructor(StringBuilder.class));\n                ForEachLoop loop = fillHeader.forEach(nonNullValuesList);\n                BytecodeCreator block = loop.block();\n                block.invokeVirtualMethod(STRING_BUILDER_APPEND, sb, loop.element());\n                ResultHandle stringValue = Gizmo.toString(fillHeader, sb);\n\n                ResultHandle stringValueLength = fillHeader.invokeVirtualMethod(STRING_LENGTH, stringValue);","sourceCodeStart":979,"sourceCodeEnd":1015,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/MicroProfileRestClientEnricher.java#L979-L1015","documentation":"When a single-expression ClientHeaderParam value resolves to one header-filler method, the generator handles only String[] (repacked to a List) and String (wrapped in a List). Any other resolved return type reaching this point fails the build with IllegalStateException. Normally unreachable because earlier validation rejects non-String/String[] types.","triggerScenarios":"A single-node header expression whose filler method return type is neither String nor String[] at bytecode-generation time — indicates validation and generation saw different types, i.e. an internal bug or exotic type representation.","commonSituations":"Only expected with framework bugs, mismatched Quarkus artifacts, or unusual type signatures the Jandex type checks classify differently.","solutions":["Change the referenced method's return type to String or String[]","Clean rebuild to rule out stale indexing","Report a Quarkus issue if the type is genuinely String/String[] and still fails"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"Method m = MyClient.class.getDeclaredMethod(\"computeHeader\");\nif (!(m.getReturnType() == String.class || m.getReturnType() == String[].class)) {\n    throw new IllegalStateException(\"Header provider must return String or String[]\");\n}","typeGuard":"static boolean isStringOrStringArray(Class<?> t) {\n    return t == String.class || t == String[].class;\n}","tryCatchPattern":null,"preventionTips":["Restrict header provider methods to String/String[] returns","Keep Quarkus versions aligned via the BOM to avoid classifier mismatches","Rebuild cleanly if type errors appear despite correct signatures"],"tags":["quarkus","rest-client","internal-error","type-mismatch"],"backgroundTag":"unsupported-return-type","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"}