Add shared API pagination and failure handling, with unit coverage #67

Closed
opened 2026-07-02 05:43:23 -05:00 by jcwalker3 · 0 comments
Owner

Curated 2026-07-02 to reflect review consensus (issue text only; not started).

Rewritten: this is not tests-only for unimplemented behavior. Today the
client paginates only via limit= query params (no Link-header / multi-page
loop) and api_request handles only HTTP 429 (Retry-After + jittered backoff,
from #27). This issue implements shared pagination + failure handling in the
reusable API client (see #65) and adds unit coverage.

If the implementation is instead split out, this issue must explicitly state
that the implementation issue lands first — but the preferred scope is
implement + test together.

Acceptance criteria

  • Multi-page pagination support (follows pagination metadata / Link headers).
  • Timeout, DNS/network-failure, and 502/503 upstream handling.
  • Malformed Gitea error-payload handling.
  • Clear, safe error surfacing (no stack-trace/secret dumps).
  • No token leakage in returned errors or logs.
  • Existing success-path behavior unchanged.

Depends on / pairs with: #65 (reusable api.py).

_Curated 2026-07-02 to reflect review consensus (issue text only; not started)._ Rewritten: this is **not** tests-only for unimplemented behavior. Today the client paginates only via `limit=` query params (no Link-header / multi-page loop) and `api_request` handles only HTTP 429 (Retry-After + jittered backoff, from #27). This issue **implements** shared pagination + failure handling in the reusable API client (see #65) **and** adds unit coverage. If the implementation is instead split out, this issue must explicitly state that the implementation issue lands first — but the preferred scope is implement + test together. ## Acceptance criteria * Multi-page pagination support (follows pagination metadata / Link headers). * Timeout, DNS/network-failure, and 502/503 upstream handling. * Malformed Gitea error-payload handling. * Clear, safe error surfacing (no stack-trace/secret dumps). * No token leakage in returned errors or logs. * Existing success-path behavior unchanged. Depends on / pairs with: #65 (reusable `api.py`).
jcwalker3 added the testingreliability labels 2026-07-02 05:43:58 -05:00
jcwalker3 changed title from Add pagination and API failure-mode coverage to Add shared API pagination and failure handling, with unit coverage 2026-07-02 11:45:56 -05:00
jcwalker3 added the status:in-progress label 2026-07-02 12:21:28 -05:00
sysadmin removed the status:in-progress label 2026-07-02 12:42:12 -05:00
Sign in to join this conversation.
No labels reliability testing
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#67