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

pull/4684/head^2
Bowen Liang 2 years ago committed by GitHub
parent 27dae156db
commit 140dd873f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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()

Loading…
Cancel
Save