diff --git a/fedn/network/api/v1/session_routes.py b/fedn/network/api/v1/session_routes.py index a045e60bf..9158b47df 100644 --- a/fedn/network/api/v1/session_routes.py +++ b/fedn/network/api/v1/session_routes.py @@ -393,7 +393,7 @@ def start_session(): min_clients = session_config["clients_required"] if control.state() == ReducerState.monitoring: - return jsonify({"message": "A session is already running."}) + return jsonify({"message": "A session is already running!"}), 400 if not rounds or not isinstance(rounds, int): rounds = session_config["rounds"] @@ -410,6 +410,7 @@ def start_session(): except Exception: return jsonify({"message": "An unexpected error occurred"}), 500 + @bp.route("/", methods=["PATCH"]) @jwt_auth_required(role="admin") def patch_session(id: str):