Error handling for getCommonInterfaceProperties API

This commit updates updateCiPropertyOfInheritedFrus and
getCommonInterfaceProperties APIs to set error code in case of error.
This helps the caller of API to take action based on the error code
returned from the API

Change-Id: Iad1dba767447f501829c2fe6a98913f98d52671d
Signed-off-by: Rekha Aparna <vrekhaaparna@ibm.com>
diff --git a/vpd-manager/src/manager.cpp b/vpd-manager/src/manager.cpp
index 66ba094..548f9ba 100644
--- a/vpd-manager/src/manager.cpp
+++ b/vpd-manager/src/manager.cpp
@@ -272,15 +272,23 @@
             }
         }
 
+        // log VPD write success or failure
+        auto l_logger = Logger::getLoggerInstance();
+
         // update common interface(s) properties
         if (l_rc != constants::FAILURE)
         {
+            l_errCode = 0;
             vpdSpecificUtility::updateCiPropertyOfInheritedFrus(
-                l_fruPath, l_writeParams, l_sysCfgJsonObj);
-        }
+                l_fruPath, l_writeParams, l_sysCfgJsonObj, l_errCode);
 
-        // log VPD write success or failure
-        auto l_logger = Logger::getLoggerInstance();
+            if (l_errCode)
+            {
+                l_logger->logMessage(
+                    "Failed to update Ci property of inherited FRUs, error : " +
+                    commonUtility::getErrCodeMsg(l_errCode));
+            }
+        }
 
         l_errCode = 0;
         l_logger->logMessage(