Return fallback for malformed Gitea collection payloads #99

Closed
opened 2026-08-06 11:15:51 +00:00 by rockachopa · 0 comments
Member

Reproduction

context() assumes repositories, issues, and pull requests are lists after the upstream gather. If Gitea (or a proxy) returns a truthy non-list payload such as an object, slicing (repo_data[:50]) raises TypeError outside the fallback boundary and the endpoint returns HTTP 500.

Expected behavior

Validate collection payload shapes inside the existing error boundary and return the dashboard's degraded fallback context rather than an unhandled exception.

Acceptance criteria

  • A behavioral regression test reproduces the malformed collection response.
  • /api/v1/context returns fallback context with a useful error instead of raising.
  • Full test suite passes.
## Reproduction `context()` assumes repositories, issues, and pull requests are lists after the upstream gather. If Gitea (or a proxy) returns a truthy non-list payload such as an object, slicing (`repo_data[:50]`) raises `TypeError` outside the fallback boundary and the endpoint returns HTTP 500. ## Expected behavior Validate collection payload shapes inside the existing error boundary and return the dashboard's degraded fallback context rather than an unhandled exception. ## Acceptance criteria - A behavioral regression test reproduces the malformed collection response. - `/api/v1/context` returns fallback context with a useful error instead of raising. - Full test suite passes.
timmy was assigned by rockachopa 2026-08-06 11:15:51 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
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: stackchain/stackchain-dashboard#99
No description provided.