diff --git a/libpldmresponder/bios_parser.cpp b/libpldmresponder/bios_parser.cpp
index 0b74059..3a45f3d 100644
--- a/libpldmresponder/bios_parser.cpp
+++ b/libpldmresponder/bios_parser.cpp
@@ -230,10 +230,9 @@
     }
 
     const auto& dbusValToValMap = internal::dbusValToValMaps.at(attrName);
-    propValue =
-        pldm::utils::DBusHandler().getDbusPropertyVariant<PropertyValue>(
-            dBusMap->objectPath.c_str(), dBusMap->propertyName.c_str(),
-            dBusMap->interface.c_str());
+    propValue = pldm::utils::DBusHandler().getDbusPropertyVariant(
+        dBusMap->objectPath.c_str(), dBusMap->propertyName.c_str(),
+        dBusMap->interface.c_str());
 
     auto iter = dbusValToValMap.find(propValue);
     if (iter != dbusValToValMap.end())
diff --git a/utils.cpp b/utils.cpp
index 1152783..20d2b06 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -186,5 +186,19 @@
     }
 }
 
+PropertyValue DBusHandler::getDbusPropertyVariant(
+    const char* objPath, const char* dbusProp, const char* dbusInterface) const
+{
+    auto& bus = DBusHandler::getBus();
+    auto service = getService(objPath, dbusInterface);
+    auto method =
+        bus.new_method_call(service.c_str(), objPath, dbusProperties, "Get");
+    method.append(dbusInterface, dbusProp);
+    PropertyValue value{};
+    auto reply = bus.call(method);
+    reply.read(value);
+    return value;
+}
+
 } // namespace utils
 } // namespace pldm
diff --git a/utils.hpp b/utils.hpp
index 6e128be..567138a 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -142,6 +142,10 @@
 
     virtual void setDbusProperty(const DBusMapping& dBusMap,
                                  const PropertyValue& value) const = 0;
+
+    virtual PropertyValue
+        getDbusPropertyVariant(const char* objPath, const char* dbusProp,
+                               const char* dbusInterface) const = 0;
 };
 
 /**
@@ -165,34 +169,51 @@
 
     /**
      *  @brief Get the DBUS Service name for the input dbus path
+     *
      *  @param[in] path - DBUS object path
      *  @param[in] interface - DBUS Interface
+     *
      *  @return std::string - the dbus service name
+     *
+     *  @throw sdbusplus::exception::SdBusError when it fails
      */
     std::string getService(const char* path, const char* interface) const;
 
-    template <typename Variant>
-    auto getDbusPropertyVariant(const char* objPath, const char* dbusProp,
-                                const char* dbusInterface)
-    {
-        Variant value;
-        auto& bus = DBusHandler::getBus();
-        auto service = getService(objPath, dbusInterface);
-        auto method = bus.new_method_call(service.c_str(), objPath,
-                                          dbusProperties, "Get");
-        method.append(dbusInterface, dbusProp);
-        auto reply = bus.call(method);
-        reply.read(value);
+    /** @brief Get property(type: variant) from the requested dbus
+     *
+     *  @param[in] objPath - The Dbus object path
+     *  @param[in] dbusProp - The property name to get
+     *  @param[in] dbusInterface - The Dbus interface
+     *
+     *  @return The value of the property(type: variant)
+     *
+     *  @throw sdbusplus::exception::SdBusError when it fails
+     */
+    PropertyValue
+        getDbusPropertyVariant(const char* objPath, const char* dbusProp,
+                               const char* dbusInterface) const override;
 
-        return value;
-    }
-
+    /** @brief The template function to get property from the requested dbus
+     *         path
+     *
+     *  @tparam Property - Excepted type of the property on dbus
+     *
+     *  @param[in] objPath - The Dbus object path
+     *  @param[in] dbusProp - The property name to get
+     *  @param[in] dbusInterface - The Dbus interface
+     *
+     *  @return The value of the property
+     *
+     *  @throw sdbusplus::exception::SdBusError when dbus request fails
+     *         std::bad_variant_access when \p Property and property on dbus do
+     *         not match
+     */
     template <typename Property>
     auto getDbusProperty(const char* objPath, const char* dbusProp,
                          const char* dbusInterface)
     {
-        auto VariantValue = getDbusPropertyVariant<std::variant<Property>>(
-            objPath, dbusProp, dbusInterface);
+        auto VariantValue =
+            getDbusPropertyVariant(objPath, dbusProp, dbusInterface);
         return std::get<Property>(VariantValue);
     }
 
@@ -201,6 +222,8 @@
      *  @param[in] dBusMap - Object path, property name, interface and property
      *                       type for the D-Bus object
      *  @param[in] value - The value to be set
+     *
+     *  @throw sdbusplus::exception::SdBusError when it fails
      */
     void setDbusProperty(const DBusMapping& dBusMap,
                          const PropertyValue& value) const override;
