{"record":{"id":"96b2c2fcf34ca638","repo":"kestra-io/kestra","slug":"unable-to-render-map-key-rendered-to-null","errorCode":null,"errorMessage":"Unable to render map: key rendered to null","messagePattern":"Unable to render map: key rendered to null","errorType":"exception","errorClass":"IllegalVariableEvaluationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/DefaultRunContext.java","lineNumber":373,"sourceCode":"\n    @Override\n    public Map<String, String> renderMap(Map<String, String> inline) throws IllegalVariableEvaluationException {\n        return renderMap(inline, Collections.emptyMap());\n    }\n\n    @Override\n    @SuppressWarnings(\"unchecked\")\n    public Map<String, String> renderMap(Map<String, String> inline, Map<String, Object> variables) throws IllegalVariableEvaluationException {\n        if (inline == null) {\n            return null;\n        }\n\n        Map<String, Object> allVariables = mergeWithNullableValues(this.variables, decryptVariables(variables));\n        Map<String, String> rendered = new LinkedHashMap<>();\n        for (Map.Entry<String, String> entry : inline.entrySet()) {\n            String renderedKey = this.render(entry.getKey(), allVariables);\n            if (renderedKey == null) {\n                throw new IllegalVariableEvaluationException(\"Unable to render map: key rendered to null\");\n            }\n            String renderedValue = this.render(entry.getValue(), allVariables);\n            if (renderedValue != null) {\n                rendered.put(renderedKey, renderedValue);\n            }\n        }\n        return rendered;\n    }\n\n    @Override\n    public <T> void validate(T bean) {\n        // It can be null in unit test as init() is not always called there\n        Validator theValidator = validator != null ? validator : applicationContext.getBean(Validator.class);\n        Set<ConstraintViolation<T>> violations = theValidator.validate(bean);\n        if (!violations.isEmpty()) {\n            throw new ConstraintViolationException(violations);\n        }\n    }","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/DefaultRunContext.java#L355-L391","documentation":"Error \"Unable to render map: key rendered to null\" thrown in kestra-io/kestra.","triggerScenarios":"Thrown at core/src/main/java/io/kestra/core/runners/DefaultRunContext.java:373 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the map keys being rendered: one of the Pebble expressions used as a key evaluates to null. Fix the expression or provide a default value so every key renders to a non-null string."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}