JetBrainsTypeHierarchyTool: Remove error handling (now auto-handled via exception)

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-01-09 18:22:59 +01:00
1 parent d58cc58195
commit 021572f572
2 files changed
-5

No files matched your search

-4
View File
@@ -245,8 +245,6 @@ class JetBrainsTypeHierarchyTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptiona
relative_path=relative_path,
depth=depth,
)
if error_msg := supertypes_response.get("error"):
return error_msg
if "num_levels_not_included" in supertypes_response:
levels_not_included["supertypes"] = supertypes_response["num_levels_not_included"]
supertypes = self._transform_hierarchy_nodes(supertypes_response.get("hierarchy"))
@@ -257,8 +255,6 @@ class JetBrainsTypeHierarchyTool(Tool, ToolMarkerSymbolicRead, ToolMarkerOptiona
relative_path=relative_path,
depth=depth,
)
if error_msg := subtypes_response.get("error"):
return error_msg
if "num_levels_not_included" in subtypes_response:
levels_not_included["subtypes"] = subtypes_response["num_levels_not_included"]
subtypes = self._transform_hierarchy_nodes(subtypes_response.get("hierarchy"))
-1
View File
@@ -47,5 +47,4 @@ class TypeHierarchyNodeDTO(TypedDict):
class TypeHierarchyResponse(TypedDict):
hierarchy: NotRequired[list[TypeHierarchyNodeDTO]]
error: NotRequired[str]
num_levels_not_included: NotRequired[int]