can1357/oh-my-pi · error · GitHubError
proxy returned malformed issue summary payload
Error message
proxy returned malformed issue summary payload
What it means
GitHubError(500) raised by _issue_summary_from when an element of the proxy's issue list/search results is not a JSON object. Each list/search item must be a dict to build an IssueSummary; a non-dict item breaks the pagination contract and aborts the whole listing.
Source
Thrown at python/robomp/src/proxy_client.py:623
def _issue_from(data: Any) -> IssueInfo:
if not isinstance(data, dict):
raise GitHubError(500, "proxy returned malformed issue payload")
labels = data.get("labels") or []
return IssueInfo(
repo=str(data["repo"]),
number=int(data["number"]),
title=str(data.get("title") or ""),
body=str(data.get("body") or ""),
state=str(data.get("state") or "open"),
author=str(data.get("author") or ""),
labels=tuple(str(x) for x in labels),
is_pull_request=bool(data.get("is_pull_request", False)),
)
def _issue_summary_from(data: Any) -> IssueSummary:
if not isinstance(data, dict):
raise GitHubError(500, "proxy returned malformed issue summary payload")
return IssueSummary(
repo=str(data["repo"]),
number=int(data["number"]),
title=str(data.get("title") or ""),
state=str(data.get("state") or ""),
author=str(data.get("author") or ""),
labels=tuple(str(x) for x in (data.get("labels") or [])),
comments=int(data.get("comments") or 0),
updated_at=str(data.get("updated_at") or ""),
created_at=str(data.get("created_at") or ""),
html_url=str(data.get("html_url") or ""),
state_reason=str(data.get("state_reason") or ""),
is_pull_request=bool(data.get("is_pull_request")),
)
def _index_entry_from(data: Any) -> IssueIndexEntry:
if not isinstance(data, dict):View on GitHub (pinned to 9690622007)
Solutions
- Dump the raw list/search response from the proxy and locate the non-object element (its index in the array).
- Check the proxy version against the client's expected schema; upgrade or roll back the proxy to the matching version.
- Look for proxy-side serialization errors for specific issues (e.g. deleted or permission-denied issues serialized as null).
- Retry the listing; if intermittent, wrap list_issues/search_issues in a retry with backoff.
- Filter/patch at the proxy to omit or repair malformed entries instead of emitting them.
Example fix
# before
for s in client.list_issues("org/repo", state="open"):
print(s.title) # GitHubError 500 on one malformed item
# after
try:
summaries = client.list_issues("org/repo", state="open")
except GitHubError as e:
if e.status == 500:
summaries = [] # degrade: log and continue with empty page
else:
raise Defensive patterns
Strategy: type-guard
Validate before calling
data = resp.json()
items = data if isinstance(data, list) else []
bad = [i for i, x in enumerate(items) if not isinstance(x, dict)]
if bad:
raise RuntimeError(f"non-object issue summary entries at indices {bad}") Type guard
def is_issue_summary(data: object) -> bool:
return isinstance(data, dict) and "repo" in data and "number" in data Try / catch
try:
summaries = client.list_issues("org/repo", state="open")
except GitHubError as e:
if e.status == 500 and "malformed issue summary" in str(e):
summaries = []
else:
raise Prevention
- Validate one page of proxy list output in CI against the IssueSummary schema.
- Check the proxy for null-emitting serialization of deleted/hidden issues.
- Keep proxy and client schema versions in lockstep.
- Fall back to per-issue get_issue on listing failure rather than aborting the job.
When it happens
Trigger: Calling list_issues() or search_issues() when the proxy returns a JSON array containing a non-object element (null, string, number) instead of an issue-summary object.
Common situations: Proxy serialization bug emitting null for tombstoned/deleted issues inside a list; proxy version skew where search results wrap items differently; truncated/mangled response body parsed into scalars; gateway injecting an error string into the items array.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- proxy returned malformed issue payload
- proxy returned malformed issue index payload
- proxy returned malformed comment payload
- proxy returned malformed reaction payload
- proxy returned malformed review_comment payload
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/4bdb8c8421d8a4f7.
Report an issue: GitHub.