fix(common): harden the vikunja client and sync against malformed responses #14

Merged
gravityfargo merged 3 commits from harden-vikunja-client into main 2026-08-19 04:21:13 +00:00
Owner

Closes #12 — all four deferred review findings:

  • projects() now raises RestAdapterError on a 2xx body that is not a list instead of silently corrupting the accumulated result.
  • The pagination walk is capped at MAX_PAGES (100); a server that always fills the page becomes a clear error instead of an infinite loop.
  • _ensure_parent uses the same explicit is not None adopt check as _resolve_child, so a falsy-but-present dict can never trigger a spurious create.
  • RestAdapter.put gains an error-path test matching get/post.
Closes #12 — all four deferred review findings: - `projects()` now raises `RestAdapterError` on a 2xx body that is not a list instead of silently corrupting the accumulated result. - The pagination walk is capped at `MAX_PAGES` (100); a server that always fills the page becomes a clear error instead of an infinite loop. - `_ensure_parent` uses the same explicit `is not None` adopt check as `_resolve_child`, so a falsy-but-present dict can never trigger a spurious create. - `RestAdapter.put` gains an error-path test matching `get`/`post`.
test(common): cover the rest adapter's put error path
All checks were successful
Test / checks (pull_request) Successful in 22s
Test / code-quality (pull_request) Successful in 0s
Test / test (pull_request) Successful in 28s
0e20a9b58f
gravityfargo deleted branch harden-vikunja-client 2026-08-19 04:21:14 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gravityfargo/local-tools!14
No description provided.