Issue-specific tools fail with -32603 Internal server error while repo-level tools work
#27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Title: Issue-specific tools fail with
-32603 Internal server errorwhile repo-level tools workSummary
All tools that target a single issue by index return
MCP error -32603: Internal server error, while repo-level list tools against the same repo succeed. This makes it impossible to read, comment on, or update any individual issue.Affected tools (all fail)
get_issuelist_issue_commentscreate_issue_comment(Anything keyed on a specific issue
indexappears affected.)Working tools (same repo, same session)
list_issues— returns the full issue list correctlyReproduction
Repo:
den-ops/infra(self-hosted Gitea at git.hiddenden.cafe)list_issues(owner="den-ops", repo="infra", state="open")→ succeeds, returns 8 issues including #23.get_issue(owner="den-ops", repo="infra", index=23)→-32603 Internal server errorlist_issue_comments(owner="den-ops", repo="infra", index=23)→-32603 Internal server errorcreate_issue_comment(owner="den-ops", repo="infra", index=23, body="...")→-32603 Internal server errorReproduced consistently across ~5 calls; not transient. The repo-level call keeps working in between the failing per-issue calls, so connectivity and auth are fine.
Expected
get_issue/list_issue_commentsreturn the issue/comments;create_issue_commentposts the comment.Actual
JSON-RPC
-32603(Internal error) with no further detail returned to the client.Environment
list_issues.Notes / hypotheses
Since repo-level listing works but every index-keyed endpoint fails, the bug likely sits in the per-issue code path (e.g. how
indexis passed to the upstream Gitea API call, or response parsing of the single-issue payload) rather than in auth/transport. Server-side logs around the-32603would pinpoint it.Opgelost in
41749fden bevestigd tegen de productie-image.Verificatie
den-ops/infra#23):get_issueenlist_issue_commentswerken weer — geen-32603meer.create_issue_commentgetest op een eigen test-issue + 25× in een write-loadtest.-32603en geen rate-limiting.Root-cause
get_issuecrashte met'NoneType' object is not iterableop issues waar Gitealabels/assigneesalsnullof met non-dict elementen teruggaf (de #13-klasse), wat als opake JSON-RPC-32603bij de client landde.Fix
read_tools: non-dictlabel/assigneeentries worden overgeslagen inget_issue_tool.server: een ingepakteGiteaNotFoundErrorwordt nu via de__cause__-keten gedetecteerd en als 404 /-32000met een duidelijke melding teruggegeven; gemaskeerde interne fouten bevatten nu het exception-type zodat toekomstige fouten diagnosticeerbaar zijn zonder messages/stacktraces te lekken.Sluiten.