diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
index 885c020..047994f 100644
--- a/fault-monitor/fru-fault-monitor.cpp
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -54,26 +54,18 @@
     auto mapper = bus.new_method_call(MAPPER_BUSNAME, MAPPER_OBJ_PATH,
                                       MAPPER_IFACE, "GetObject");
     mapper.append(path.c_str(), std::vector<std::string>({OBJMGR_IFACE}));
-    auto mapperResponseMsg = bus.call(mapper);
-    if (mapperResponseMsg.is_method_error())
-    {
-        using namespace xyz::openbmc_project::Led::Mapper;
-        elog<MethodErr>(MethodError::METHOD_NAME("GetObject"),
-                        MethodError::PATH(path.c_str()),
-                        MethodError::INTERFACE(OBJMGR_IFACE));
-    }
 
     std::map<std::string, std::vector<std::string>> mapperResponse;
     try
     {
+        auto mapperResponseMsg = bus.call(mapper);
         mapperResponseMsg.read(mapperResponse);
     }
     catch (const sdbusplus::exception::exception& e)
     {
         log<level::ERR>(
-            "Failed to parse getService mapper response",
-            entry("ERROR=%s", e.what()),
-            entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
+            "Failed to GetObject or parse getService mapper response",
+            entry("ERROR=%s", e.what()));
         using namespace xyz::openbmc_project::Led::Mapper;
         elog<ObjectNotFoundErr>(ObjectNotFoundError::METHOD_NAME("GetObject"),
                                 ObjectNotFoundError::PATH(path.c_str()),
@@ -215,30 +207,12 @@
     try
     {
         auto mapperResponseMsg = bus.call(mapperCall);
-        if (mapperResponseMsg.is_method_error())
-        {
-            using namespace xyz::openbmc_project::Led::Mapper;
-            report<MethodErr>(MethodError::METHOD_NAME("GetSubTree"),
-                              MethodError::PATH(MAPPER_OBJ_PATH),
-                              MethodError::INTERFACE(OBJMGR_IFACE));
-            return;
-        }
-
-        try
-        {
-            mapperResponseMsg.read(subtree);
-        }
-        catch (const sdbusplus::exception::exception& e)
-        {
-            log<level::ERR>(
-                "Failed to parse existing callouts subtree message",
-                entry("ERROR=%s", e.what()),
-                entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
-        }
+        mapperResponseMsg.read(subtree);
     }
     catch (const sdbusplus::exception::exception& e)
     {
-        // Just means no log entries at the moment
+        log<level::ERR>("Failed to parse existing callouts subtree message",
+                        entry("ERROR=%s", e.what()));
     }
 }
 
@@ -275,10 +249,9 @@
         }
         catch (const sdbusplus::exception::exception& e)
         {
-            log<level::ERR>(
-                "Failed to parse existing callouts associations message",
-                entry("ERROR=%s", e.what()),
-                entry("REPLY_SIG=%s", reply.get_signature()));
+            log<level::ERR>("Failed to get Associations or  parse existing "
+                            "callouts associations message",
+                            entry("ERROR=%s", e.what()));
             continue;
         }
         auto& assocs = std::get<AssociationList>(assoc);
