Bug: get_issue endpoint returns 'NoneType' object is not iterable for valid issues
#13
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?
Summary
When using the MCP connector to fetch a specific issue via
get_issue, the request fails with the error:This occurs even when the issue clearly exists and is visible via
list_issues.Steps to Reproduce
list_issuesfor a repository (e.g.Hiddenden/Cozy-Den).get_issuewith one of the returned issue numbers (example:issue_number=29).Example request:
Expected Behavior
The API should return the issue metadata and body content.
Actual Behavior
The MCP layer returns:
Notes
list_issuesworks correctly and returns the issue metadata.None.Possible Cause
The MCP adapter may be assuming a field (likely labels, reactions, or comments) is always iterable while the Gitea API can return
null.Impact
This prevents tools using the MCP server from retrieving issue bodies or doing deeper analysis on issues.
Suggested Fix
Add null-safety handling when parsing the Gitea issue response, ensuring optional fields default to empty lists rather than
None.Environment: AegisGitea-MCP via ChatGPT MCP integration