diff --git a/phosphor-power-sequencer/src/power_interface.cpp b/phosphor-power-sequencer/src/power_interface.cpp
index 13d0af6..50f5911 100644
--- a/phosphor-power-sequencer/src/power_interface.cpp
+++ b/phosphor-power-sequencer/src/power_interface.cpp
@@ -54,7 +54,7 @@
 
             sdbusplus::message::message(msg).append(pgood);
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
@@ -87,7 +87,7 @@
 
             sdbusplus::message::message(msg).append(timeout);
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
@@ -121,7 +121,7 @@
             reply.append(pgood);
             reply.method_return();
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
@@ -157,7 +157,7 @@
                 fmt::format("callbackSetPgoodTimeout: {}", timeout).c_str());
             pwrObj->setPgoodTimeout(timeout);
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
@@ -190,7 +190,7 @@
 
             sdbusplus::message::message(msg).append(state);
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
@@ -231,7 +231,7 @@
 
             m.new_method_return().method_return();
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
diff --git a/phosphor-power-supply/power_supply.cpp b/phosphor-power-supply/power_supply.cpp
index ed1f9af..96dfaa0 100644
--- a/phosphor-power-supply/power_supply.cpp
+++ b/phosphor-power-supply/power_supply.cpp
@@ -114,7 +114,7 @@
         file << bindDevice;
         file.close();
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         auto err = errno;
 
@@ -156,7 +156,7 @@
             present = false;
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(
             fmt::format("presenceGPIO read fail: {}", e.what()).c_str());
@@ -261,7 +261,7 @@
                 vinUVFault = false;
             }
         }
-        catch (ReadFailure& e)
+        catch (const ReadFailure& e)
         {
             readFail++;
             phosphor::logging::commit<ReadFailure>();
@@ -316,7 +316,7 @@
             static_cast<void>(
                 pmbusIntf->read("in1_input", phosphor::pmbus::Type::Hwmon));
         }
-        catch (ReadFailure& e)
+        catch (const ReadFailure& e)
         {
             // Since I do not care what the return value is, I really do not
             // care much if it gets a ReadFailure either. However, this
@@ -426,7 +426,7 @@
             assetProps.emplace(MODEL_PROP, ccin);
             modelName = ccin;
         }
-        catch (ReadFailure& e)
+        catch (const ReadFailure& e)
         {
             // Ignore the read failure, let pmbus code indicate failure,
             // path...
@@ -441,7 +441,7 @@
             pn = pmbusIntf->readString(PART_NUMBER, Type::HwmonDeviceDebug);
             assetProps.emplace(PN_PROP, pn);
         }
-        catch (ReadFailure& e)
+        catch (const ReadFailure& e)
         {
             // Ignore the read failure, let pmbus code indicate failure,
             // path...
@@ -451,7 +451,7 @@
         {
             fn = pmbusIntf->readString(FRU_NUMBER, Type::HwmonDeviceDebug);
         }
-        catch (ReadFailure& e)
+        catch (const ReadFailure& e)
         {
             // Ignore the read failure, let pmbus code indicate failure,
             // path...
@@ -464,7 +464,7 @@
             sn = pmbusIntf->readString(SERIAL_NUMBER, Type::HwmonDeviceDebug);
             assetProps.emplace(SN_PROP, sn);
         }
-        catch (ReadFailure& e)
+        catch (const ReadFailure& e)
         {
             // Ignore the read failure, let pmbus code indicate failure,
             // path...
@@ -476,7 +476,7 @@
                 pmbusIntf->readString(FW_VERSION, Type::HwmonDeviceDebug);
             versionProps.emplace(VERSION_PROP, fwVersion);
         }
-        catch (ReadFailure& e)
+        catch (const ReadFailure& e)
         {
             // Ignore the read failure, let pmbus code indicate failure,
             // path...
@@ -541,7 +541,7 @@
 
             auto reply = bus.call(method);
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             log<level::ERR>(
                 std::string(e.what() + std::string(" PATH=") + inventoryPath)
diff --git a/phosphor-power-supply/psu_manager.cpp b/phosphor-power-supply/psu_manager.cpp
index 603c0ef..ee21a81 100644
--- a/phosphor-power-supply/psu_manager.cpp
+++ b/phosphor-power-supply/psu_manager.cpp
@@ -125,7 +125,7 @@
                     std::get_if<std::string>(&properties[presLineName]);
             }
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {}
     }
 
@@ -221,7 +221,7 @@
 
         supportedConfigs.emplace(*model, sys);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {}
 }
 
@@ -249,7 +249,7 @@
             populateSysProperties(properties);
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         // Interface or property not found. Let the Interfaces Added callback
         // process the information once the interfaces are added to D-Bus.
@@ -288,7 +288,7 @@
             validateConfig();
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         // Ignore, the property may be of a different type than expected.
     }
@@ -350,7 +350,7 @@
 
         auto reply = bus.call(method);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(
             fmt::format(
diff --git a/phosphor-power-supply/psu_manager.hpp b/phosphor-power-supply/psu_manager.hpp
index 68dd091..d95caa3 100644
--- a/phosphor-power-supply/psu_manager.hpp
+++ b/phosphor-power-supply/psu_manager.hpp
@@ -92,7 +92,7 @@
                 runValidateConfig = true;
             }
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             log<level::INFO>("Failed to get power state. Assuming it is off.");
             powerOn = false;
diff --git a/phosphor-power-supply/util.cpp b/phosphor-power-supply/util.cpp
index 73f86e0..858d1a3 100644
--- a/phosphor-power-supply/util.cpp
+++ b/phosphor-power-supply/util.cpp
@@ -21,7 +21,7 @@
             throw std::runtime_error("Line does not exist: " + namedGpio);
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         phosphor::logging::log<phosphor::logging::level::ERR>(
             fmt::format("Failed to find line: {}", e.what()).c_str());
@@ -60,7 +60,7 @@
         {
             value = line.get_value();
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             log<level::ERR>(
                 fmt::format("Failed to get_value of GPIO line: {}", e.what())
@@ -71,7 +71,7 @@
 
         line.release();
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>("Failed to request GPIO line",
                         entry("MSG=%s", e.what()));
diff --git a/phosphor-regulators/src/interfaces/manager_interface.cpp b/phosphor-regulators/src/interfaces/manager_interface.cpp
index 47c233d..9e1cb34 100644
--- a/phosphor-regulators/src/interfaces/manager_interface.cpp
+++ b/phosphor-regulators/src/interfaces/manager_interface.cpp
@@ -53,7 +53,7 @@
 
             reply.method_return();
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
@@ -88,7 +88,7 @@
 
             reply.method_return();
         }
-        catch (sdbusplus::exception_t& e)
+        catch (const sdbusplus::exception_t& e)
         {
             return sd_bus_error_set(error, e.name(), e.description());
         }
diff --git a/pmbus.cpp b/pmbus.cpp
index 3440667..5483ca4 100644
--- a/pmbus.cpp
+++ b/pmbus.cpp
@@ -98,7 +98,7 @@
         file.open(path);
         file >> name;
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>((std::string("Unable to read PMBus device name "
                                      "PATH=") +
@@ -147,7 +147,7 @@
             elog<InternalFailure>();
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         auto rc = errno;
 
@@ -189,7 +189,7 @@
         file.open(path);
         file >> std::hex >> data;
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         auto rc = errno;
         log<level::ERR>((std::string("Failed to read sysfs file "
@@ -222,7 +222,7 @@
         file.open(path);
         file >> data;
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         auto rc = errno;
         log<level::ERR>((std::string("Failed to read sysfs file "
diff --git a/power-sequencer/pgood_monitor.cpp b/power-sequencer/pgood_monitor.cpp
index 3c74fdb..d86acef 100644
--- a/power-sequencer/pgood_monitor.cpp
+++ b/power-sequencer/pgood_monitor.cpp
@@ -114,7 +114,7 @@
 
         return timer.get_event().loop();
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(e.what());
         log<level::ERR>("Unexpected failure prevented PGOOD checking");
diff --git a/power-sequencer/runtime_monitor.cpp b/power-sequencer/runtime_monitor.cpp
index f706655..01c3e4c 100644
--- a/power-sequencer/runtime_monitor.cpp
+++ b/power-sequencer/runtime_monitor.cpp
@@ -57,7 +57,7 @@
 
         util::powerOff<Shutdown>(bus);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         // No need to crash
         log<level::ERR>(e.what());
diff --git a/power-sequencer/ucd90160.cpp b/power-sequencer/ucd90160.cpp
index 6775dfb..72728e4 100644
--- a/power-sequencer/ucd90160.cpp
+++ b/power-sequencer/ucd90160.cpp
@@ -72,7 +72,7 @@
             createPowerFaultLog();
         }
     }
-    catch (device_error::ReadFailure& e)
+    catch (const device_error::ReadFailure& e)
     {
         if (!accessError)
         {
@@ -91,7 +91,7 @@
 
         checkPGOODFaults(true);
     }
-    catch (device_error::ReadFailure& e)
+    catch (const device_error::ReadFailure& e)
     {
         if (!accessError)
         {
@@ -156,7 +156,7 @@
                 nv.add("STATUS_VOUT", vout);
                 nv.add("MFR_STATUS", readMFRStatus());
             }
-            catch (device_error::ReadFailure& e)
+            catch (const device_error::ReadFailure& e)
             {
                 log<level::ERR>("ReadFailure when collecting metadata");
                 commit<device_error::ReadFailure>();
@@ -221,7 +221,7 @@
 
             gpiStatus = gpio->second->read();
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             if (!accessError)
             {
@@ -254,7 +254,7 @@
                 nv.add("MFR_STATUS", readMFRStatus());
                 nv.add("INPUT_STATUS", status);
             }
-            catch (device_error::ReadFailure& e)
+            catch (const device_error::ReadFailure& e)
             {
                 log<level::ERR>("ReadFailure when collecting metadata");
                 commit<device_error::ReadFailure>();
@@ -285,7 +285,7 @@
         nv.add("STATUS_WORD", readStatusWord());
         nv.add("MFR_STATUS", readMFRStatus());
     }
-    catch (device_error::ReadFailure& e)
+    catch (const device_error::ReadFailure& e)
     {
         log<level::ERR>("ReadFailure when collecting metadata");
         commit<device_error::ReadFailure>();
@@ -383,7 +383,7 @@
 
             value = g.read();
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             if (!gpioAccessError)
             {
@@ -449,7 +449,7 @@
         nv.add("STATUS_WORD", readStatusWord());
         nv.add("MFR_STATUS", readMFRStatus());
     }
-    catch (device_error::ReadFailure& e)
+    catch (const device_error::ReadFailure& e)
     {
         log<level::ERR>("ReadFailure when collecting metadata");
         commit<device_error::ReadFailure>();
@@ -471,7 +471,7 @@
         nv.add("STATUS_WORD", readStatusWord());
         nv.add("MFR_STATUS", readMFRStatus());
     }
-    catch (device_error::ReadFailure& e)
+    catch (const device_error::ReadFailure& e)
     {
         log<level::ERR>("ReadFailure when collecting metadata");
         commit<device_error::ReadFailure>();
@@ -493,7 +493,7 @@
         nv.add("STATUS_WORD", readStatusWord());
         nv.add("MFR_STATUS", readMFRStatus());
     }
-    catch (device_error::ReadFailure& e)
+    catch (const device_error::ReadFailure& e)
     {
         log<level::ERR>("ReadFailure when collecting metadata");
         commit<device_error::ReadFailure>();
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index be89ed3..548895d 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -78,7 +78,7 @@
                          std::string(PowerSupplyInputFault::errName));
         }
     }
-    catch (ReadFailure& e)
+    catch (const ReadFailure& e)
     {
         log<level::INFO>("Unable to read the 2 byte STATUS_WORD value to check "
                          "for power-supply input faults.");
@@ -122,7 +122,7 @@
             auto val = pmbusIntf.read(cmd, type);
             nv.add(cmd, val);
         }
-        catch (std::exception& e)
+        catch (const std::exception& e)
         {
             log<level::INFO>("Unable to capture metadata",
                              entry("CMD=%s", cmd.c_str()));
@@ -158,7 +158,7 @@
             updateHistory();
         }
     }
-    catch (ReadFailure& e)
+    catch (const ReadFailure& e)
     {
         if (readFail < FAULT_COUNT)
         {
@@ -597,7 +597,7 @@
             }
         }
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::INFO>("Failed to resolve error",
                          entry("CALLOUT=%s", callout.c_str()),
@@ -637,7 +637,7 @@
                                                    inventoryPMBusAccessType)
                             : "");
             }
-            catch (ReadFailure& e)
+            catch (const ReadFailure& e)
             {}
         }
     }
@@ -670,7 +670,7 @@
 
         auto reply = bus.call(method);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::ERR>(e.what(), entry("PATH=%s", inventoryPath.c_str()));
     }
@@ -699,7 +699,7 @@
 
         recordManager->clear();
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         // Do nothing.  There would already be a journal entry.
     }
diff --git a/power-supply/record_manager.cpp b/power-supply/record_manager.cpp
index 53e8fe3..a182c8c 100644
--- a/power-supply/record_manager.cpp
+++ b/power-supply/record_manager.cpp
@@ -88,7 +88,7 @@
             records.pop_back();
         }
     }
-    catch (InvalidRecordException& e)
+    catch (const InvalidRecordException& e)
     {
         return false;
     }
diff --git a/utility.cpp b/utility.cpp
index ee65cff..04cb6ae 100644
--- a/utility.cpp
+++ b/utility.cpp
@@ -168,7 +168,7 @@
         getProperty<int32_t>(POWER_IFACE, "state", POWER_OBJ_PATH, service, bus,
                              state);
     }
-    catch (std::exception& e)
+    catch (const std::exception& e)
     {
         log<level::INFO>("Failed to get power state.");
     }
