diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
index 898cf77..6c9edd4 100644
--- a/app/watchdog_service.cpp
+++ b/app/watchdog_service.cpp
@@ -1,10 +1,12 @@
 #include "watchdog_service.hpp"
 
+#include <exception>
 #include <phosphor-logging/elog.hpp>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/message.hpp>
+#include <stdexcept>
 #include <string>
 #include <xyz/openbmc_project/Common/error.hpp>
 #include <xyz/openbmc_project/State/Watchdog/server.hpp>
@@ -71,17 +73,31 @@
         log<level::ERR>("WatchdogService: Method error getting properties");
         elog<InternalFailure>();
     }
+    try
+    {
+        std::map<std::string, variant<bool, uint64_t, std::string>> properties;
+        response.read(properties);
+        Properties wd_prop;
+        wd_prop.initialized = get<bool>(properties.at("Initialized"));
+        wd_prop.enabled = get<bool>(properties.at("Enabled"));
+        wd_prop.expireAction = Watchdog::convertActionFromString(
+                get<std::string>(properties.at("ExpireAction")));
+        wd_prop.interval = get<uint64_t>(properties.at("Interval"));
+        wd_prop.timeRemaining = get<uint64_t>(properties.at("TimeRemaining"));
+        return wd_prop;
+    }
+    catch (const std::exception& e)
+    {
+        log<level::ERR>("WatchdogService: Decode error in get properties",
+                        entry("ERROR=%s", e.what()),
+                        entry("REPLY_SIG=%s", response.get_signature()));
+        elog<InternalFailure>();
+    }
 
-    std::map<std::string, variant<bool, uint64_t, std::string>> properties;
-    response.read(properties);
-    Properties wd_prop;
-    wd_prop.initialized = get<bool>(properties.at("Initialized"));
-    wd_prop.enabled = get<bool>(properties.at("Enabled"));
-    wd_prop.expireAction = Watchdog::convertActionFromString(
-            get<std::string>(properties.at("ExpireAction")));
-    wd_prop.interval = get<uint64_t>(properties.at("Interval"));
-    wd_prop.timeRemaining = get<uint64_t>(properties.at("TimeRemaining"));
-    return wd_prop;
+    // Needed instead of elog<InternalFailure>() since the compiler can't
+    // deduce the that elog<>() always throws
+    throw std::runtime_error(
+            "WatchdogService: Should not reach end of getProperties");
 }
 
 template <typename T>
@@ -103,9 +119,25 @@
                         entry("PROPERTY=%s", key.c_str()));
         elog<InternalFailure>();
     }
-    variant<T> value;
-    response.read(value);
-    return get<T>(value);
+    try
+    {
+        variant<T> value;
+        response.read(value);
+        return get<T>(value);
+    }
+    catch (const std::exception& e)
+    {
+        log<level::ERR>("WatchdogService: Decode error in get property",
+                        entry("PROPERTY=%s", key.c_str()),
+                        entry("ERROR=%s", e.what()),
+                        entry("REPLY_SIG=%s", response.get_signature()));
+        elog<InternalFailure>();
+    }
+
+    // Needed instead of elog<InternalFailure>() since the compiler can't
+    // deduce the that elog<>() always throws
+    throw std::runtime_error(
+            "WatchdogService: Should not reach end of getProperty");
 }
 
 template <typename T>
