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
|
@ -107,11 +107,11 @@ class CodeExecutor:
|
||||||
response = response.json()
|
response = response.json()
|
||||||
except:
|
except:
|
||||||
raise CodeExecutionException('Failed to parse response')
|
raise CodeExecutionException('Failed to parse response')
|
||||||
|
|
||||||
|
if (code := response.get('code')) != 0:
|
||||||
|
raise CodeExecutionException(f"Got error code: {code}. Got error msg: {response.get('message')}")
|
||||||
|
|
||||||
response = CodeExecutionResponse(**response)
|
response = CodeExecutionResponse(**response)
|
||||||
|
|
||||||
if response.code != 0:
|
|
||||||
raise CodeExecutionException(response.message)
|
|
||||||
|
|
||||||
if response.data.error:
|
if response.data.error:
|
||||||
raise CodeExecutionException(response.data.error)
|
raise CodeExecutionException(response.data.error)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user