ErrorsReads and writes · rule
data.patch_not_input
Patch given something other than an Input.
Area 6, Reads and writes; not declinable; the next step is usually the agent's.
type ItemName = Text { max_length: 80}entity Item { id: Uuid name: ItemName}action copy_name(item: Item, from: Item) -> Item { return Item.update(item) { patch: from }}
error patch: takes an Input, and this is Item
--> main.jadpo:12:16
|12 | patch: from | ^^^^ this is `Item`
- reason
- A patch changes only the fields a request supplied, so it takes an
Inputwhose fields are optional and named afterItem's: one left out keeps its value, and one sent asnoneis cleared. - next
- Pass an
Inputsuch astype PatchItem = Input { pick: [...] optional: all }(agent) - rule
- data.
patch_ not_ input - help
- https://jadpo.
dev/docs/errors/data. patch_ not_ input
Markdown for agents: /docs/errors/data.patch_not_input.md.Built from Jadpo main at aee2e8f.