Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(tool_file_manager): raise ValueError when get timeout (#11928)
-LAN-90323cd35595
diff --git a/api/core/tools/tool_file_manager.py b/api/core/tools/tool_file_manager.pyindex 5052f0897a2..2aaca6d82e3 100644--- a/api/core/tools/tool_file_manager.py+++ b/api/core/tools/tool_file_manager.py@@ -8,9 +8,10 @@ from mimetypes import guess_extension, guess_typefrom typing import Optional, Unionfrom uuid import uuid4-from httpx import get+import httpxfrom configs import dify_config+from core.helper import ssrf_proxyfrom extensions.ext_database import dbfrom extensions.ext_storage import storagefrom models.model import MessageFile@@ -94,12 +95,11 @@ class ToolFileManager:) -> ToolFile:# try to download imagetry:- response = get(file_url)+ response = ssrf_proxy.get(file_url)response.raise_for_status()blob = response.content- except Exception as e:- logger.exception(f"Failed to download file from {file_url}")- raise+ except httpx.TimeoutException as e:+ raise ValueError(f"timeout when downloading file from {file_url}")mimetype = guess_type(file_url)[0] or "octet/stream"extension = guess_extension(mimetype) or ".bin"