set error code for getServiceName API

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

Change-Id: I0146ca08a9cedfcb5f77fcda6fe00637a15ab281
Signed-off-by: Rekha Aparna <vrekhaaparna@ibm.com>
diff --git a/vpd-manager/include/error_codes.hpp b/vpd-manager/include/error_codes.hpp
index 7ba6a5c..60a1492 100644
--- a/vpd-manager/include/error_codes.hpp
+++ b/vpd-manager/include/error_codes.hpp
@@ -19,6 +19,7 @@
     FRU_PATH_NOT_FOUND,
     JSON_PARSE_ERROR,
     JSON_MISSING_GPIO_INFO,
+    JSON_MISSING_SERVICE_NAME,
 
     // Generic errors.
     INVALID_INPUT_PARAMETER,
@@ -42,6 +43,8 @@
     {error_code::INVALID_INPUT_PARAMETER,
      "Either one of the input parameter is invalid or empty."},
     {error_code::JSON_MISSING_GPIO_INFO, "JSON missing required GPIO info."},
+    {error_code::JSON_MISSING_SERVICE_NAME,
+     "JSON missing the service name for the FRU"},
     {error_code::DEVICE_NOT_PRESENT,
      "Presence pin read successfully but device was absent."},
     {error_code::DEVICE_PRESENCE_UNKNOWN, "Exception on presence line GPIO."},