From eb42677648b513f54a1ce9e8665da4c56b3837c0 Mon Sep 17 00:00:00 2001 From: Saleh Mir Date: Sat, 14 Dec 2024 19:20:48 +0330 Subject: [PATCH] Improve error message for when a duplicate strategy already exists. --- jesse/services/strategy_handler/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jesse/services/strategy_handler/__init__.py b/jesse/services/strategy_handler/__init__.py index bab7c2586..cb7715db1 100644 --- a/jesse/services/strategy_handler/__init__.py +++ b/jesse/services/strategy_handler/__init__.py @@ -12,7 +12,7 @@ def generate(name: str) -> JSONResponse: return JSONResponse({ 'status': 'error', 'message': f'Strategy "{name}" already exists.' - }, status_code=400) + }, status_code=409) # generate from ExampleStrategy dirname, filename = os.path.split(os.path.abspath(__file__))