mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
fix: log tool server connectivity failures without a traceback (#27757)
This commit is contained in:
parent
6b4131d1d7
commit
fd7024f198
1 changed files with 4 additions and 0 deletions
|
|
@ -1491,6 +1491,10 @@ async def get_tool_server_data(url: str, headers: dict | None) -> dict[str, Any]
|
|||
# Fall back to YAML for non-.yml URLs that aren't valid JSON
|
||||
res = yaml.safe_load(text_content)
|
||||
|
||||
except (aiohttp.ClientConnectionError, TimeoutError) as err:
|
||||
error = str(err) or type(err).__name__
|
||||
log.error(f'Could not fetch tool server spec from {url}: {error}')
|
||||
raise Exception(error)
|
||||
except Exception as err:
|
||||
log.exception(f'Could not fetch tool server spec from {url}')
|
||||
if isinstance(err, dict) and 'detail' in err:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue