feat: improve error handling for API configuration errors

Add error_handler utility to detect and format HTML error responses
from misconfigured API base URLs. When the API returns HTML (indicating
configuration issues), users now see a helpful message instead of raw
HTML content.
This commit is contained in:
YueGuobin committed 2026-03-19 00:46:49 +08:00
1 parent c5325fdee4
commit 01d24403d3
3 files changed
+94 -1

No files matched your search

@@ -37,6 +37,7 @@ Author: Yue Guobin (岳国宾)
"""
# Import main utility functions
from .error_handler import format_error_message
from .get_gns3_device_port import get_device_ports_from_topology
from .parse_tool_content import format_tool_response
from .parse_tool_content import normalize_tool_response
@@ -56,6 +57,7 @@ __url__ = "https://github.com/yueguobin/gns3-copilot"
# Export main utility functions
__all__ = [
"format_error_message",
"get_device_ports_from_topology",
"parse_tool_content",
"format_tool_response",