Sfoglia il codice sorgente

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

tags/0.6.9
Bowen Liang 1 anno fa
parent
commit
140dd873f1
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3
    1
      api/core/helper/code_executor/code_executor.py

+ 3
- 1
api/core/helper/code_executor/code_executor.py Vedi File

@@ -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…
Annulla
Salva