mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +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