소스 검색

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

Bowen Liang 11 달 전
부모
커밋
140dd873f1
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      api/core/helper/code_executor/code_executor.py

+ 3 - 1
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()