-
Notifications
You must be signed in to change notification settings - Fork 59
fixed for attribute errors #401
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -968,4 +968,9 @@ def find_content(result: MCPToolResult) -> str | None: | |
| return value | ||
| except json.JSONDecodeError: | ||
| pass | ||
| if not isinstance(json_content,dict): | ||
| continue | ||
| for key, value in json_content.items(): | ||
| if key in accept_keys: | ||
| return value | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AttributeError fix is unreachable due to uncaught exceptionHigh Severity The Reviewed by Cursor Bugbot for commit de66bdb. Configure here. |
||
| return "" | ||


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.
Possible NameError referencing unassigned
json_contentvariableMedium Severity
When
json.loadsraisesJSONDecodeErroron the firstTextContentitem,json_contentis never assigned. Line 971 then referencesjson_contentoutside thetry/exceptblock, which raises aNameErrorat runtime. On subsequent iterations, it would instead use a stale value from a prior iteration, leading to incorrect behavior.Reviewed by Cursor Bugbot for commit de66bdb. Configure here.