fix: surface a00.un API errors + document dueDate-clearing limitation (v0.4.15)
- fw_client: detect nested a00.un errors (previously silent-failed as success) - update_task: add clear_due_date=True parameter that returns a clear error explaining the Family Wall API cannot clear dueDate once set - SPEC.md: document all tested clearing candidates and their API responses, add Fehlerstruktur-Varianten section - Verified: dueDate cannot be removed via any form-encoded value; all invalid date strings are rejected via a00.un.un (silently swallowed before this fix) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -185,4 +185,12 @@ class FamilyWallClient:
|
||||
msg = f"API error from {endpoint!r}: {error_data}"
|
||||
raise FamilyWallError(msg, response_data=body)
|
||||
|
||||
# Some endpoints (e.g. taskupdate2) return per-call errors nested under
|
||||
# a00.un.un instead of top-level — detect and surface them.
|
||||
a00 = body.get("a00", {})
|
||||
if isinstance(a00, dict) and "un" in a00:
|
||||
nested = a00["un"]
|
||||
msg = f"API error from {endpoint!r}: {nested}"
|
||||
raise FamilyWallError(msg, response_data=body)
|
||||
|
||||
return body
|
||||
|
||||
Reference in New Issue
Block a user