ErrorsReads and writes · rule
data.patch_overlap
Supplied-field block sets a field the patch already sets.
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 nickname: ItemName?}type ItemChanges = Input { pick: [Item.name, Item.nickname] optional: all}action edit(item: Item, amendment: ItemChanges) -> Item { return Item.update(item) { patch: amendment when_supplied: { name: { nickname: none } } }}
error nickname is set by the patch and by when_supplied:
--> main.jadpo:21:17
|21 | nickname: none | ^^^^^^^^ set twice
- reason
ItemChangessuppliesnicknamealready, so a value here would compete with the request's.- next
- Remove
nicknamefromwhen_supplied:, or fromItemChanges(agent) - rule
- data.
patch_ overlap - help
- https://jadpo.
dev/docs/errors/data. patch_ overlap
Markdown for agents: /docs/errors/data.patch_overlap.md.Built from Jadpo main at aee2e8f.