Logic · rule
failure.outcome_infallible
Outcome match is on a call that cannot fail.
Area 3, Logic; not declinable; the next step is usually the agent's.
type LookupKey = Text {}type LookupResult = Text {}function plain(key: LookupKey) -> LookupResult { return "ok"}function needless(key: LookupKey) -> LookupResult { return match plain(key) { success(value) -> value }}
error: `plain(...)` can't fail, so it has no outcome to match --> main.jadpo:10:12 |10 | return match plain(key) { | ^^^^^^^^^^^^^^^^ always succeeds reason: `plain(...)` lists no failures after `fails`, so it always gives its result and there is nothing for failure arms to handle. next: Use the call's result directly (agent) rule: failure.outcome_infallible help: https://jadpo.dev/docs/errors/failure.outcome_infalliblecheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/failure.outcome_infallible.md.Built from Jadpo main at a707efb.