From 49a75f8c9ccbacba5f573d47fe1ca4c7fdad1731 Mon Sep 17 00:00:00 2001 From: Amichay Oren Date: Thu, 20 Jul 2023 22:45:44 +0300 Subject: [PATCH] bug-fix: handle case of failed run --- apigateway/missions/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apigateway/missions/main.py b/apigateway/missions/main.py index 68226d7..3565b5a 100644 --- a/apigateway/missions/main.py +++ b/apigateway/missions/main.py @@ -136,7 +136,7 @@ def handle_post(request): ) if not (run_id := create_run(user_id, model_portfolio)): - return None + return ("could not create rebalance run", 400) print(f"created run with id {run_id}") mission_id, created = save_new_mission(user_id, name, strategy)