diff --git a/manager.cpp b/manager.cpp
index f8cd289..5f23208 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -69,15 +69,16 @@
 
 void Manager::updateNtpSetting(const std::string& value)
 {
-    bool isNtp =
-        (value == "xyz.openbmc_project.Time.Synchronization.Method.NTP");
-    auto method = bus.new_method_call(SYSTEMD_TIME_SERVICE, SYSTEMD_TIME_PATH,
-                                      SYSTEMD_TIME_INTERFACE, METHOD_SET_NTP);
-    method.append(isNtp, false); // isNtp: 'true/false' means Enable/Disable
-                                 // 'false' meaning no policy-kit
-
     try
     {
+        bool isNtp =
+            (value == "xyz.openbmc_project.Time.Synchronization.Method.NTP");
+        auto method =
+            bus.new_method_call(SYSTEMD_TIME_SERVICE, SYSTEMD_TIME_PATH,
+                                SYSTEMD_TIME_INTERFACE, METHOD_SET_NTP);
+        method.append(isNtp, false); // isNtp: 'true/false' means Enable/Disable
+                                     // 'false' meaning no policy-kit
+
         bus.call_noreply(method);
         lg2::info("Updated NTP setting: {ENABLED}", "ENABLED", isNtp);
     }
@@ -89,17 +90,22 @@
 
 bool Manager::setCurrentTimeMode(const std::string& mode)
 {
-    auto newMode = utils::strToMode(mode);
-    if (newMode != timeMode)
+    try
     {
-        lg2::info("Time mode has been changed to {MODE}", "MODE", newMode);
-        timeMode = newMode;
-        return true;
+        auto newMode = utils::strToMode(mode);
+        if (newMode != timeMode)
+        {
+            lg2::info("Time mode has been changed to {MODE}", "MODE", newMode);
+            timeMode = newMode;
+            return true;
+        }
     }
-    else
+    catch (const sdbusplus::exception_t& ex)
     {
-        return false;
+        lg2::error("Failed to convert mode from string: {ERROR}", "ERROR", ex);
     }
+
+    return false;
 }
 
 void Manager::onTimeModeChanged(const std::string& mode)
@@ -111,9 +117,19 @@
 std::string Manager::getSetting(const char* path, const char* interface,
                                 const char* setting) const
 {
-    std::string settingManager = utils::getService(bus, path, interface);
-    return utils::getProperty<std::string>(bus, settingManager.c_str(), path,
-                                           interface, setting);
+    try
+    {
+        std::string settingManager = utils::getService(bus, path, interface);
+        return utils::getProperty<std::string>(bus, settingManager.c_str(),
+                                               path, interface, setting);
+    }
+    catch (const std::exception& ex)
+    {
+        lg2::error(
+            "Failed to get property: {ERROR}, path: {PATH}, interface: {INTERFACE}, name: {NAME}",
+            "ERROR", ex, "PATH", path, "INTERFACE", interface, "NAME", setting);
+        return {};
+    }
 }
 
 } // namespace time
diff --git a/settings.cpp b/settings.cpp
index b8b3a0d..0d368d1 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -44,7 +44,6 @@
     if (result.empty())
     {
         lg2::error("Invalid response from mapper");
-        elog<InternalFailure>();
     }
 
     for (const auto& iter : result)
diff --git a/test/TestManager.cpp b/test/TestManager.cpp
index b879d3a..2f5990c 100644
--- a/test/TestManager.cpp
+++ b/test/TestManager.cpp
@@ -33,7 +33,7 @@
     }
 };
 
-TEST_F(TestManager, DISABLED_propertyChanged)
+TEST_F(TestManager, propertyChanged)
 {
     notifyPropertyChanged(
         "TimeSyncMethod",
