Skip to content

armgit / dify

Public Imported from GitHub
0

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.

fix: show exception message when sandbox execution fails (#4663)

Bowen Liang140dd873f184
diff --git a/api/core/helper/code_executor/code_executor.py b/api/core/helper/code_executor/code_executor.py
index bc92dde17d6..37573c88cee 100644
--- a/api/core/helper/code_executor/code_executor.py
+++ b/api/core/helper/code_executor/code_executor.py
@@ -99,7 +99,9 @@ class CodeExecutor:
except CodeExecutionException as e:
raise e
except Exception as e:
- raise CodeExecutionException('Failed to execute code, this is likely a network issue, please check if the sandbox service is running')
+ raise CodeExecutionException('Failed to execute code, which is likely a network issue,'
+ ' please check if the sandbox service is running.'
+ f' ( Error: {str(e)} )')
try:
response = response.json()