fix: sandbox tips

This commit is contained in:
Yeuoly 2024-04-03 14:40:04 +08:00
parent aee669f67d
commit 3ac37e802a
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
1 changed files with 2 additions and 2 deletions

View File

@ -64,11 +64,11 @@ class CodeExecutor:
if response.status_code == 503:
raise CodeExecutionException('Code execution service is unavailable')
elif response.status_code != 200:
raise Exception('Failed to execute code')
raise Exception(f'Failed to execute code, got status code {response.status_code}, please check if the sandbox service is running')
except CodeExecutionException as e:
raise e
except Exception as e:
raise CodeExecutionException('Failed to execute code')
raise CodeExecutionException('Failed to execute code, this is likely a network issue, please check if the sandbox service is running')
try:
response = response.json()