route.output_required
Route has no output:.
Area 7, HTTP; not declinable; the next step is usually the agent's.
A route shows its contract without opening what it runs:
type Memo = Text { max_length: 200}type MemoId = Uuid {}type AddMemo = Input { text: Memo}type MemoView = Output { text: Memo}action add_memo(input: AddMemo) -> MemoView { return MemoView { text: input.text }}routes Memos { prefix: /memos POST / { input: AddMemo run: add_memo(input) }}
error POST /memos has no output:
--> main.jadpo:24:5
|24 | POST / { | ^^^^^^ no `output:`
- reason
- A route shows its contract without opening what it runs:
output:names what it sends, exactly whatadd_memoreturns (MemoView). - next
- Add
output: MemoView(agent) - rule
- route.
output_ required - help
- https://jadpo.
dev/docs/errors/route. output_ required
What returns Unit sends nothing, so the route answers 204 rather than
naming an output::
type Memo = Text { max_length: 200}type AddMemo = Input { text: Memo}action check_memo(input: AddMemo) -> Unit { assert input.text == input.text}routes Memos { prefix: /memos POST /checks { input: AddMemo run: check_memo(input) }}
error POST /memos/checks has no output:
--> main.jadpo:16:5
|16 | POST /checks { | ^^^^^^^^^^^^ no `output:`
- reason
- A route shows its contract without opening what it runs:
check_memoreturnsUnit, so the route sends nothing, whichstatus: SuccessStatus.no_contentsays, answering 204 with no body. - next
- Add
status: SuccessStatus.no_content(agent) - rule
- route.
output_ required - help
- https://jadpo.
dev/docs/errors/route. output_ required
Markdown for agents: /docs/errors/route.output_required.md.Built from Jadpo main at aee2e8f.