From 3ac37e802aa217c63008ee562da151561faa0410 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Wed, 3 Apr 2024 14:40:04 +0800 Subject: [PATCH] fix: sandbox tips --- api/core/helper/code_executor/code_executor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/helper/code_executor/code_executor.py b/api/core/helper/code_executor/code_executor.py index 30d349838d..fb95c43d3c 100644 --- a/api/core/helper/code_executor/code_executor.py +++ b/api/core/helper/code_executor/code_executor.py @@ -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()