kestra-io/kestra · error · Exception

errors: ``` {} ```

Error message

 errors:
```
{}
```

What it means

A catch-all wrapper inside `parseType`: any throwable that is NOT an `IllegalArgumentException` or `ConstraintViolationException` (those are re-thrown unchanged at line 605-606) is re-thrown as a generic `Exception` whose message is the original message wrapped in a markdown code fence prefixed by a leading space. The leading space and markdown fences are a presentation artifact — the real cause is `e.getMessage()` inside the fence. This obscures the original exception type, so callers lose stack-trace fidelity.

Source

Thrown at core/src/main/java/io/kestra/core/runners/FlowInputOutput.java:608

                            .map(throwFunction(element ->
                            {
                                try {
                                    return parseType(execution, elementType, id, null, element, data);
                                } catch (Throwable e) {
                                    throw new IllegalArgumentException("Unable to parse array element as `" + elementType + "` on `" + element + "`", e);
                                }
                            }))
                            .toList();
                    } else {
                        yield asList;
                    }
                }
                case FORM, REUSABLE_INPUTS -> throw new IllegalStateException("FORM and REUSABLE_INPUTS inputs must be expanded before resolution");
            };
        } catch (IllegalArgumentException | ConstraintViolationException e) {
            throw e;
        } catch (Throwable e) {
            throw new Exception(" errors:\n```\n" + e.getMessage() + "\n```");
        }
    }

    private static Execution minimalExecution(FlowInterface flow, String executionId) {
        return Execution.builder()
            .id(executionId)
            .tenantId(flow.getTenantId())
            .namespace(flow.getNamespace())
            .flowId(flow.getId())
            .flowRevision(flow.getRevision())
            .state(new State())
            .variables(flow.getVariables())
            .build();
    }

    /**
     * Mutable wrapper to hold a flow's input, and it's resolved value.
     */

View on GitHub (pinned to 823fada927)

Solutions

  1. Read the text inside the markdown fence — it is the real underlying error message; fix that root cause (fix the JSON, the date format, enable encryption, etc.).
  2. If you call `parseType` programmatically, catch `Exception` and unwrap `getCause()` / inspect the fenced message rather than relying on the exception type.
  3. For SECRET inputs, ensure `kestra.encryption.secret-key` is configured before submitting secret values.
  4. Report an issue if the fenced message is itself empty — that indicates a parser threw with a null message.

Example fix

// before — caller treats the wrapper as opaque
try {
    parseType(execution, type, id, elementType, current, data);
} catch (Exception e) {
    log.error(e.getMessage()); // prints ' errors:\n```\n...\n```'
}

// after — unwrap the real cause for diagnostics
} catch (Exception e) {
    String real = e.getMessage() == null ? "<null>"
        : e.getMessage().replaceAll("(?s)^\\s*errors:\\n```\\n|\\n```$", "");
    log.error("Input parse failed: {}", real, e);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate JSON/YAML/datetime values before they reach parseType
if (type == Type.JSON && current instanceof String s) {
    try { JacksonMapper.toObject(s); }
    catch (Exception ex) { throw new IllegalArgumentException("Invalid JSON for " + id + ": " + ex.getMessage(), ex); }
}

Try / catch

try {
    parseType(execution, type, id, elementType, current, data);
} catch (Exception e) {
    // unwrap the fenced message for the real cause
    String real = e.getMessage() == null ? "<no message>"
        : e.getMessage().replaceAll("(?s)^\\s*errors:\\n```\\n|\\n```$", "");
    throw new InputOutputValidationException(real, e);
}

Prevention

When it happens

Trigger: Any parsing failure inside `parseType` that is not already an IAE/CVE — e.g. a `JsonProcessingException` from JSON/ION/YAML mappers, an `IllegalStateException` from the FORM/REUSABLE_INPUTS branch, the SECRET-not-configured `Exception` at line 544, a `TypeConverter` `DateTimeException`, or any `IOException`. The wrapper fires for inputs/outputs of every primitive and composite type.

Common situations: A JSON input whose rendered value is not valid JSON; a DATETIME input with an unparseable timestamp string; a SECRET input when encryption is not configured; a YAML/ION input with malformed markup; upgrading Kestra and a previously-tolerated value now fails a stricter parser.

Related errors


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