Skip to content

fix: handle empty body in GitHub issue resolver#13039

Merged
malhotra5 merged 2 commits intoOpenHands:mainfrom
stakeswky:fix/github-issue-empty-body
Mar 18, 2026
Merged

fix: handle empty body in GitHub issue resolver#13039
malhotra5 merged 2 commits intoOpenHands:mainfrom
stakeswky:fix/github-issue-empty-body

Conversation

@stakeswky
Copy link
Copy Markdown
Contributor

Fixes #13023

Problem

When an issue or PR has a None body (e.g. the user left the description empty), the resolver could crash with a NoneType error during string concatenation or regex operations in issue_definitions.py.

While individual handlers (GitHub, GitLab, etc.) each had their own None'' guards, these were inconsistent and any new handler could easily miss this check.

Fix

Added a Pydantic field_validator on Issue.body that coerces None to '' before validation, and set the default to ''. This provides a single, centralized safety net at the model level regardless of which handler creates the Issue.

Copy link
Copy Markdown
Collaborator

@malhotra5 malhotra5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@malhotra5 malhotra5 merged commit c62b47d into OpenHands:main Mar 18, 2026
15 checks passed
@mamoodi mamoodi added the release:cloud-1.18.0 Released in Cloud 1.18.0 label Mar 26, 2026 — with OpenHands AI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:cloud-1.18.0 Released in Cloud 1.18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Client error '401 Unauthorized' for url when create new conversation

3 participants