Merge "changes for url_prefix and featuregroup controller and service"
authorsubhash kumar singh <subh.singh@samsung.com>
Thu, 26 Dec 2024 11:57:31 +0000 (11:57 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Thu, 26 Dec 2024 11:57:31 +0000 (11:57 +0000)
1  2 
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