Move to Redfish setProperty call

This commit changes sdbusplus setProperty calls (in various files) to
setDbusProperty method in Redfish namespace that handles all DBus
errors in a consistent manner.

It also handles and translates additional DBus errors to Redfish
specific errors in dbus_utils file.

Tested By:
Not tested yet

Change-Id: If440774879413754f4c24f9b6572c3c9fa1fd033
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 80276d2..ad07d1c 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -53,20 +53,11 @@
         return;
     }
 
-    sdbusplus::asio::setProperty(
-        *crow::connections::systemBus, "xyz.openbmc_project.Settings",
-        "/xyz/openbmc_project/control/host0/power_cap",
-        "xyz.openbmc_project.Control.Power.Cap", "PowerCap", valueToSet,
-        [sensorsAsyncResp](const boost::system::error_code& ec2) {
-        if (ec2)
-        {
-            BMCWEB_LOG_DEBUG("Power Limit Set: Dbus error: {}", ec2);
-            messages::internalError(sensorsAsyncResp->asyncResp->res);
-            return;
-        }
-        sensorsAsyncResp->asyncResp->res.result(
-            boost::beast::http::status::no_content);
-    });
+    setDbusProperty(sensorsAsyncResp->asyncResp, "xyz.openbmc_project.Settings",
+                    sdbusplus::message::object_path(
+                        "/xyz/openbmc_project/control/host0/power_cap"),
+                    "xyz.openbmc_project.Control.Power.Cap", "PowerCap",
+                    "PowerControl", valueToSet);
 }
 
 inline void afterGetChassisPath(