#[non_exhaustive]pub enum IssueCode {
Show 27 variants
EmptyWorkflowId,
EmptyWorkflowName,
NoTasks,
MissingStepId,
DuplicateStepId,
EmptyGroup,
GroupTooDeep,
MissingFunction,
InvalidFunctionName,
InvalidTerminal,
UnguardedValidation,
InvalidHaltOn,
GroupContinueOnError,
LoopIncrementTooSmall,
LoopBoundEmpty,
LoopCounterInvalid,
UnknownFunction,
MissingHandler,
InputParse,
TemplateCompile,
UnknownSecret,
SecretInMessageWrite,
InvalidSecretStore,
DuplicateTemplateKey,
EscapedTemplateKey,
ParseFailed,
ValidateFailed,
}Expand description
Why a workflow definition is not loadable.
#[non_exhaustive]: a later minor may add a rule, and a host matching on
the codes it cares about should keep compiling. Use Self::as_str to
serialize.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyWorkflowId
id is missing or empty.
EmptyWorkflowName
name is missing or empty.
NoTasks
tasks is missing, not an array, or empty.
MissingStepId
A step carries no id.
DuplicateStepId
Two steps share an id. Groups share the task id namespace.
EmptyGroup
A group’s tasks is not a non-empty array.
GroupTooDeep
A group is nested at or beyond
MAX_GROUP_DEPTH.
MissingFunction
A task carries no function.
InvalidFunctionName
function is not an object, or its name is missing or empty.
InvalidTerminal
terminal is present but not a boolean.
UnguardedValidation
A validation task whose failure cannot stop anything: it is not
terminal, has no halt_on, and every task after it in the workflow is
unguarded. A failing rule returns 400, which continue_on_error does
not cover, so the pipeline proceeds as if it had passed.
Informational — reported by
crate::EngineBuilder::check_workflow and never by
crate::EngineBuilder::build. Validating purely to record errors is a
legitimate shape; this only says the assertion is not acting as a gate.
InvalidHaltOn
halt_on is present and is not one of the accepted strings, or is
present on a group — a group has no outcome of its own, so the
executor could not honour it.
GroupContinueOnError
A task group carries continue_on_error, which the engine drops. Error
handling is per task and per workflow; a group only gates a span.
Informational — reported by
crate::EngineBuilder::check_workflow and never by
crate::EngineBuilder::build. Unlike Self::InvalidHaltOn, which
the parser refuses outright, this key is real at the other two levels
and may already sit on a host’s group nodes; refusing it would abort
every workflow in the build.
LoopIncrementTooSmall
loop.increment is below 1 — the counter would never reach max.
LoopBoundEmpty
loop.max is not greater than loop.init — no sweep could ever run.
LoopCounterInvalid
loop.counter is not a non-empty dotted path.
UnknownFunction
No handler will dispatch this function name, and it is not a built-in. Usually a typo or a handler the host forgot to register.
MissingHandler
The name is a built-in, but one that ships as a config schema only
(http_call, enrich, publish_kafka) and no handler is registered
under it. The workflow builds cleanly and then fails every message.
InputParse
A custom task’s input does not deserialize into its handler’s declared
Input type.
TemplateCompile
A Template field of a custom task’s input does not compile.
UnknownSecret
An expression reads {"secret": "name"} and no secret of that name is
declared on the engine (EngineBuilder::with_secrets). Only literal
names are checked; a dynamic name fails at evaluation instead.
SecretInMessageWrite
An expression whose result the engine writes to the message or emits to
a log reads a secret — a map mapping, or a log message or field. The
store exists so a value is never recorded; an expression that would
record it is refused outright, derived or not. Compute derived values in
a custom handler.
InvalidSecretStore
The store passed to
EngineBuilder::with_secrets is
not a JSON object, so no name resolves and
EngineBuilder::build will fail.
Reported by
EngineBuilder::check_workflow
instead of the Self::UnknownSecret issues every literal name would
otherwise produce — the workflow is not what is wrong.
DuplicateTemplateKey
Two keys in one template object collapse to the same name once the
template-key escape is stripped — {"$a": 1, "a": 2} emits a twice.
The context is a Vec of pairs, so both survive: a later read sees only
the first while serialization emits both. Always a bug, so
crate::EngineBuilder::build refuses it.
EscapedTemplateKey
A template key carries the escape prefix, so it is emitted with one
prefix stripped: $type emits type. Informational — reported by
crate::Engine::check_workflow and never by
crate::EngineBuilder::build.
Exists for migration. The escape strips uniformly from every template
key, so a workflow written before 3.9 that emits genuinely $-prefixed
keys — MongoDB’s $set/$oid, JSON Schema’s $schema/$ref — changes
what it produces, silently. This lists every one so the audit is
mechanical rather than archaeological.
ParseFailed
The document does not deserialize into a Workflow. Carries the
parser’s own message, which names the offending field and type.
ValidateFailed
The document parses but Workflow::validate rejects it. A backstop:
reaching this means a rule exists that the checks above do not model.