Redfish : Return after InternalError instead of Continue

"After setting response to internal error you should stop adding more content to response. Try to return instead of continuing a loop"

https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/39970/9/redfish-core/lib/pcie_slots.hpp#169

Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Iadd3062ba7fef31ba61eea1e79eb3a903716b9e9
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index f97dba2..8d76722 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -1760,7 +1760,7 @@
                     if (!state)
                     {
                         messages::internalError(aResp->res);
-                        continue;
+                        return;
                     }
 
                     hostWatchdogTimer["FunctionEnabled"] = *state;
@@ -1772,14 +1772,14 @@
                     if (!s)
                     {
                         messages::internalError(aResp->res);
-                        continue;
+                        return;
                     }
 
                     std::string action = dbusToRfWatchdogAction(*s);
                     if (action.empty())
                     {
                         messages::internalError(aResp->res);
-                        continue;
+                        return;
                     }
                     hostWatchdogTimer["TimeoutAction"] = action;
                 }