{"record":{"id":"a747e367d41c9807","repo":"quarkusio/quarkus","slug":"no-params-to-evaluate","errorCode":null,"errorMessage":"No params to evaluate","messagePattern":"No params to evaluate","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/qute/core/src/main/java/io/quarkus/qute/EvaluatedParams.java","lineNumber":67,"sourceCode":"                asyncResults.add(fu);\n                allResults[i++] = Futures.toSupplier(fu);\n            }\n        }\n        CompletionStage<?> cs;\n        if (asyncResults == null) {\n            cs = failure != null ? failure : CompletedStage.ofVoid();\n        } else if (asyncResults.size() == 1) {\n            cs = asyncResults.get(0);\n        } else {\n            cs = CompletableFuture.allOf(asyncResults.toArray(new CompletableFuture[0]));\n        }\n        return new EvaluatedParams(cs, allResults);\n    }\n\n    public static EvaluatedParams evaluateMessageKey(EvalContext context) {\n        List<Expression> params = context.getParams();\n        if (params.isEmpty()) {\n            throw new IllegalArgumentException(\"No params to evaluate\");\n        }\n        return new EvaluatedParams(context.evaluate(params.get(0)));\n    }\n\n    public static EvaluatedParams evaluateMessageParams(EvalContext context) {\n        List<Expression> params = context.getParams();\n        if (params.size() < 2) {\n            return EMPTY;\n        } else if (params.size() == 2) {\n            return new EvaluatedParams(context.evaluate(params.get(1)));\n        }\n        Supplier<?>[] allResults = new Supplier[params.size()];\n        List<CompletableFuture<?>> asyncResults = null;\n\n        int i = 0;\n        CompletedStage<?> failure = null;\n        Iterator<Expression> it = params.subList(1, params.size()).iterator();\n        while (it.hasNext()) {","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/qute/core/src/main/java/io/quarkus/qute/EvaluatedParams.java#L49-L85","documentation":"EvaluatedParams.evaluateMessageKey(EvalContext) evaluates the first expression parameter (the message key) of a bundle message method like {msg:key}. It requires at least one parameter; calling it with an empty parameter list throws this IllegalArgumentException.","triggerScenarios":"Invoking evaluateMessageKey on an EvalContext whose getParams() is empty — e.g. a message bundle method expression {msg} with no key argument.","commonSituations":"Typo in a template using a message bundle resolver without a key, a message-bound method invoked with no arguments, or custom extensions reusing evaluateMessageKey for expressions that legitimately have no params.","solutions":["Fix the template to pass a message key: {msg:greeting} instead of {msg}","Check that the bundle method declaration matches the template usage (key is required)","In custom code, check context.getParams().isEmpty() before calling evaluateMessageKey"],"exampleFix":"// before (template)\n{msg}\n// after (template)\n{msg:hello}","handlingStrategy":"validation","validationCode":"List<Expression> params = context.getParams();\nif (params.isEmpty()) {\n    // fall back or report a clear error before calling evaluateMessageKey\n}","typeGuard":null,"tryCatchPattern":"try {\n    EvaluatedParams p = EvaluatedParams.evaluateMessageKey(context);\n} catch (IllegalArgumentException e) {\n    throw new TemplateException(\"Message bundle expression requires a key: {msg:key}\");\n}","preventionTips":["Always pass a key to message bundle expressions: {msg:hello}","Match template usage to bundle method signatures","Lint templates for bare {msg} usages","Check params list before invoking evaluateMessageKey in custom resolvers"],"tags":["qute","templates","message-bundle","validation"],"backgroundTag":"missing-required-argument","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"}