[nu-demo] CRUD delete across hero_osis SDK — server returns bool, SDK expects String (confirmed on contact.delete) #143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
In the Contacts island on heronu.gent01.grid.tf, clicking the red delete button on a contact yields:
The contact IS deleted server-side (create+delete both work on the backend), but the UI surfaces a hard error banner because the SDK client can't deserialize the
{"result": true}response.Create works cleanly. Delete fails on every CRUD domain I've spot-checked.
Root cause
Tracked already at hero_osis#29 —
project.delete(and siblings) returns bool, SDK expects String.contact.deleteis the same pattern on theidentity/contactsdomain.Every per-domain
*.deletemethod (base/identity/calendar/business/projects/media/files/communication/network/...) is likely affected unless individually remediated.Demo workaround
None practical — requires SDK regen + rebuild of hero_os_app WASM. For the demo we leave the red banner.
Proper fix
Pick one:
*.deletemethods to return{deleted: true}or{sid: "sXXX"}or bare""(string) instead of a bare boolean. Regenerate SDKs.*.deleteresults asserde_json::Valueand accepttrue/""/ any successful JSON value as success; only the RPC-levelerrorfield indicates failure.Option 2 is more robust — future OpenRPC spec drift won't break anything. Option 1 is simpler but has to be done N times (once per domain, ~17 domains).
Regardless: a single-PR sweep across every domain's delete handler + a test that asserts round-trip via the SDK.
Related
Filed 2026-04-23 nu-shell demo. Signed-off-by: mik-tf
Moved to hero_demo#20 — see lhumina_code/hero_demo#20