[RICPLT-2527] Implementation of DissociateRan + UTs
[ric-plt/e2mgr.git] / E2Manager / managers / e2t_instances_manager.go
index eefeea1..0a95f5f 100644 (file)
@@ -14,6 +14,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
+
 //  This source code is part of the near-RT RIC (RAN Intelligent Controller)
 //  platform project (RICP).
 
@@ -234,7 +235,7 @@ func (m *E2TInstancesManager) RemoveRanFromInstance(ranName string, e2tAddress s
 
        if err != nil {
                m.logger.Errorf("#E2TInstancesManager.RemoveRanFromInstance - E2T Instance address: %s - Failed retrieving E2TInstance. error: %s", e2tAddress, err)
-               return err
+               return e2managererrors.NewRnibDbError()
        }
 
        i := 0 // output index
@@ -252,7 +253,7 @@ func (m *E2TInstancesManager) RemoveRanFromInstance(ranName string, e2tAddress s
 
        if err != nil {
                m.logger.Errorf("#E2TInstancesManager.RemoveRanFromInstance - E2T Instance address: %s - Failed saving E2TInstance. error: %s", e2tAddress, err)
-               return err
+               return e2managererrors.NewRnibDbError()
        }
 
        m.logger.Infof("#E2TInstancesManager.RemoveRanFromInstance - successfully dissociated RAN %s from E2T %s", ranName, e2tInstance.Address)