[VOL-3767] Log instead of throwing errors when deletion target is not found
Change-Id: I497fa7f41bb4fe2ec6662832b5d7c8cb45f17699
diff --git a/internal/pkg/core/openolt_flowmgr.go b/internal/pkg/core/openolt_flowmgr.go
index 41988ec..9b3a9de 100644
--- a/internal/pkg/core/openolt_flowmgr.go
+++ b/internal/pkg/core/openolt_flowmgr.go
@@ -1915,10 +1915,12 @@
logger.Warnw(ctx, "child device and its associated resources are already cleared", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
return nil
}
- return olterrors.NewErrNotFound("tech-profile-in-kv-store",
+ // If the tech profile is not found, since we want to delete it, there is no need to throw an error
+ _ = olterrors.NewErrNotFound("tech-profile-in-kv-store",
log.Fields{
"tp-id": tpID,
- "path": tpPath}, err)
+ "path": tpPath}, err).Log()
+ return nil
}
var allGemPortsFree = true