{"record":{"id":"047185601c1964d1","repo":"kestra-io/kestra","slug":"errors","errorCode":null,"errorMessage":" errors:\n```\n{}\n```","messagePattern":" errors:\n```\n(.+?)\n```","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/FlowInputOutput.java","lineNumber":608,"sourceCode":"                            .map(throwFunction(element ->\n                            {\n                                try {\n                                    return parseType(execution, elementType, id, null, element, data);\n                                } catch (Throwable e) {\n                                    throw new IllegalArgumentException(\"Unable to parse array element as `\" + elementType + \"` on `\" + element + \"`\", e);\n                                }\n                            }))\n                            .toList();\n                    } else {\n                        yield asList;\n                    }\n                }\n                case FORM, REUSABLE_INPUTS -> throw new IllegalStateException(\"FORM and REUSABLE_INPUTS inputs must be expanded before resolution\");\n            };\n        } catch (IllegalArgumentException | ConstraintViolationException e) {\n            throw e;\n        } catch (Throwable e) {\n            throw new Exception(\" errors:\\n```\\n\" + e.getMessage() + \"\\n```\");\n        }\n    }\n\n    private static Execution minimalExecution(FlowInterface flow, String executionId) {\n        return Execution.builder()\n            .id(executionId)\n            .tenantId(flow.getTenantId())\n            .namespace(flow.getNamespace())\n            .flowId(flow.getId())\n            .flowRevision(flow.getRevision())\n            .state(new State())\n            .variables(flow.getVariables())\n            .build();\n    }\n\n    /**\n     * Mutable wrapper to hold a flow's input, and it's resolved value.\n     */","sourceCodeStart":590,"sourceCodeEnd":626,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/FlowInputOutput.java#L590-L626","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.).","If you call `parseType` programmatically, catch `Exception` and unwrap `getCause()` / inspect the fenced message rather than relying on the exception type.","For SECRET inputs, ensure `kestra.encryption.secret-key` is configured before submitting secret values.","Report an issue if the fenced message is itself empty — that indicates a parser threw with a null message."],"exampleFix":"// before — caller treats the wrapper as opaque\ntry {\n    parseType(execution, type, id, elementType, current, data);\n} catch (Exception e) {\n    log.error(e.getMessage()); // prints ' errors:\\n```\\n...\\n```'\n}\n\n// after — unwrap the real cause for diagnostics\n} catch (Exception e) {\n    String real = e.getMessage() == null ? \"<null>\"\n        : e.getMessage().replaceAll(\"(?s)^\\\\s*errors:\\\\n```\\\\n|\\\\n```$\", \"\");\n    log.error(\"Input parse failed: {}\", real, e);\n}","handlingStrategy":"try-catch","validationCode":"// Validate JSON/YAML/datetime values before they reach parseType\nif (type == Type.JSON && current instanceof String s) {\n    try { JacksonMapper.toObject(s); }\n    catch (Exception ex) { throw new IllegalArgumentException(\"Invalid JSON for \" + id + \": \" + ex.getMessage(), ex); }\n}","typeGuard":null,"tryCatchPattern":"try {\n    parseType(execution, type, id, elementType, current, data);\n} catch (Exception e) {\n    // unwrap the fenced message for the real cause\n    String real = e.getMessage() == null ? \"<no message>\"\n        : e.getMessage().replaceAll(\"(?s)^\\\\s*errors:\\\\n```\\\\n|\\\\n```$\", \"\");\n    throw new InputOutputValidationException(real, e);\n}","preventionTips":["Never rely on the wrapper exception's type for control flow — it is always a bare Exception.","Pre-validate SECRET (encryption configured), DATETIME (ISO-8601), JSON/ION/YAML (parseable) before submission.","Treat an empty fenced message as a bug in the underlying parser and report it."],"tags":["inputs","error-wrapping","parsing","diagnostics"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}