mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-04 12:17:52 +08:00
fix: code execution node not display clear reasons when sandbox res error (#6830)
This commit is contained in:
parent
62cc4077bb
commit
bf3f1027c8
@ -108,10 +108,10 @@ class CodeExecutor:
|
||||
except:
|
||||
raise CodeExecutionException('Failed to parse response')
|
||||
|
||||
response = CodeExecutionResponse(**response)
|
||||
if (code := response.get('code')) != 0:
|
||||
raise CodeExecutionException(f"Got error code: {code}. Got error msg: {response.get('message')}")
|
||||
|
||||
if response.code != 0:
|
||||
raise CodeExecutionException(response.message)
|
||||
response = CodeExecutionResponse(**response)
|
||||
|
||||
if response.data.error:
|
||||
raise CodeExecutionException(response.data.error)
|
||||
|
Loading…
Reference in New Issue
Block a user