route.output_not_output
Route output is not an Output type.
Area 7, HTTP; not declinable; the next step is usually the agent's.
A route sends only an Output, or a map layer whose properties hold only what an Output may, so only fields declared for clients leave the server:
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 }}type MemoRecord = Object { text: Memo}action keep_memo(input: AddMemo) -> MemoRecord { return MemoRecord { text: input.text }}routes Memos { prefix: /memos POST / { input: AddMemo output: MemoRecord run: keep_memo(input) }}
error MemoRecord isn't an Output
--> main.jadpo:36:17
|36 | output: MemoRecord | ^^^^^^^^^^ not an `Output`
- reason
- A route returns only an
Outputtype (area 2), aListorPageof one as a query gives them, aFeatureCollection<G, P>whose propertiesPhold only what anOutputmay (area 20), or anAiStream, a model's answer sent as it is written, so only fields declared for clients are ever sent. - next
- Declare
type <Name> = Output { ... }with the fields clients see, and return it (agent) - rule
- route.
output_ not_ output - help
- https://jadpo.
dev/docs/errors/route. output_ not_ output
Markdown for agents: /docs/errors/route.output_not_output.md.Built from Jadpo main at aee2e8f.