From: subhash kumar singh Date: Thu, 26 Dec 2024 11:57:31 +0000 (+0000) Subject: Merge "changes for url_prefix and featuregroup controller and service" X-Git-Tag: 3.0.0~3 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=a4a7b730d0db3747b93d0197524f9428db75fcb8;p=aiml-fw%2Fawmf%2Ftm.git Merge "changes for url_prefix and featuregroup controller and service" --- a4a7b730d0db3747b93d0197524f9428db75fcb8 diff --cc trainingmgr/controller/featuregroup_controller.py index 5ce3cad,46909cf..419b91b --- a/trainingmgr/controller/featuregroup_controller.py +++ b/trainingmgr/controller/featuregroup_controller.py @@@ -116,9 -120,11 +118,11 @@@ def create_feature_group() return {"Exception": str(err)}, 400 except DBException as err: LOGGER.error(f"Failed to create the feature Group {str(err)}") + if "already exist" in str(err): + return {"Exception": str(err)}, 409 return {"Exception": str(err)}, 400 - except Exception as e: - api_response = {"Exception":str(e)} + except Exception as err: + api_response = {"Exception":str(err)} LOGGER.error(f"Failed to create the feature Group {str(err)}") jsonify(json.dumps(api_response)), 500