-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #7658: [Bug]: BadRequestError from ContentPolicyViolationError #7660
Conversation
@openhands-agent Read the diff of this PR carefully: it's PR 7660 . Use GitHub API to read it. Read also its description, and the linked issue. The diff is not correct: the error might come to us either as ContentPolicyViolationError as defined in litellm, either as BadRequestError with the error string containing ContentPolicyViolationError. You should catch it and handle it like we handle BudgetExceeded errors. |
…icyViolationError
Based on the provided information, here is a concise overview: Status: ✅ FULLY RESOLVED Changes Made:
All key requirements appear to have been met:
No remaining issues are indicated in the provided information. |
tests/unit/resolver/github/test_issue_handler_error_handling.py
Outdated
Show resolved
Hide resolved
…enHands into openhands-fix-issue-7658
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
End-user friendly description of the problem this fixes or functionality that this introduces.
User-friendly UI for a content policy violation error
This pull request fixes #7658.
The issue has been successfully resolved based on the following implemented changes and their effects:
The core problem (BadRequestError from ContentPolicyViolationError not being properly handled) has been directly addressed by adding explicit error handling for ContentPolicyViolationError in agent_controller.py.
The implementation includes:
These changes fully address the original issue by providing proper handling of the ContentPolicyViolationError, making it consistent with how other errors are handled in the system, and ensuring users receive clear feedback when content policy violations occur.
Automatic fix generated by OpenHands 🙌
To run this PR locally, use the following command: