kestra-io/kestra · error · IllegalVariableEvaluationException

Unable to render map: key rendered to null

Error message

Unable to render map: key rendered to null

What it means

Error "Unable to render map: key rendered to null" thrown in kestra-io/kestra.

Source

Thrown at core/src/main/java/io/kestra/core/runners/DefaultRunContext.java:373

    @Override
    public Map<String, String> renderMap(Map<String, String> inline) throws IllegalVariableEvaluationException {
        return renderMap(inline, Collections.emptyMap());
    }

    @Override
    @SuppressWarnings("unchecked")
    public Map<String, String> renderMap(Map<String, String> inline, Map<String, Object> variables) throws IllegalVariableEvaluationException {
        if (inline == null) {
            return null;
        }

        Map<String, Object> allVariables = mergeWithNullableValues(this.variables, decryptVariables(variables));
        Map<String, String> rendered = new LinkedHashMap<>();
        for (Map.Entry<String, String> entry : inline.entrySet()) {
            String renderedKey = this.render(entry.getKey(), allVariables);
            if (renderedKey == null) {
                throw new IllegalVariableEvaluationException("Unable to render map: key rendered to null");
            }
            String renderedValue = this.render(entry.getValue(), allVariables);
            if (renderedValue != null) {
                rendered.put(renderedKey, renderedValue);
            }
        }
        return rendered;
    }

    @Override
    public <T> void validate(T bean) {
        // It can be null in unit test as init() is not always called there
        Validator theValidator = validator != null ? validator : applicationContext.getBean(Validator.class);
        Set<ConstraintViolation<T>> violations = theValidator.validate(bean);
        if (!violations.isEmpty()) {
            throw new ConstraintViolationException(violations);
        }
    }

View on GitHub (pinned to 823fada927)

Solutions

  1. 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.

When it happens

Trigger: Thrown at core/src/main/java/io/kestra/core/runners/DefaultRunContext.java:373 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kestra-io/kestra@823fada927 (2026-08-14). Data as JSON: /api/errors/96b2c2fcf34ca638. Report an issue: GitHub.