Minor changes in the code to use the appropriate errors

This commit contains changes that replaces the error messages
in the response's body with the appropriate one.

This change was made based on the comment in the following commit:
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/32033/35/
redfish-core/lib/log_services.hpp#501

Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I56a63f1cde27776b86d588695ce9505bf38d7f38
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 0707371..c4d4e89 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1444,8 +1444,7 @@
                                 id = std::get_if<uint32_t>(&propertyMap.second);
                                 if (id == nullptr)
                                 {
-                                    messages::propertyMissing(asyncResp->res,
-                                                              "Id");
+                                    messages::internalError(asyncResp->res);
                                 }
                             }
                             else if (propertyMap.first == "Timestamp")
@@ -1454,8 +1453,7 @@
                                     std::get_if<uint64_t>(&propertyMap.second);
                                 if (millisTimeStamp == nullptr)
                                 {
-                                    messages::propertyMissing(asyncResp->res,
-                                                              "Timestamp");
+                                    messages::internalError(asyncResp->res);
                                     continue;
                                 }
                                 // Retrieve Created property with format:
@@ -1473,8 +1471,7 @@
                                     &propertyMap.second);
                                 if (severity == nullptr)
                                 {
-                                    messages::propertyMissing(asyncResp->res,
-                                                              "Severity");
+                                    messages::internalError(asyncResp->res);
                                 }
                             }
                             else if (propertyMap.first == "Message")
@@ -1483,8 +1480,7 @@
                                     &propertyMap.second);
                                 if (message == nullptr)
                                 {
-                                    messages::propertyMissing(asyncResp->res,
-                                                              "Message");
+                                    messages::internalError(asyncResp->res);
                                 }
                             }
                         }
@@ -1568,7 +1564,7 @@
                         id = std::get_if<uint32_t>(&propertyMap.second);
                         if (id == nullptr)
                         {
-                            messages::propertyMissing(asyncResp->res, "Id");
+                            messages::internalError(asyncResp->res);
                         }
                     }
                     else if (propertyMap.first == "Timestamp")
@@ -1577,8 +1573,7 @@
                             std::get_if<uint64_t>(&propertyMap.second);
                         if (millisTimeStamp == nullptr)
                         {
-                            messages::propertyMissing(asyncResp->res,
-                                                      "Timestamp");
+                            messages::internalError(asyncResp->res);
                             continue;
                         }
                         // Retrieve Created property with format:
@@ -1596,8 +1591,7 @@
                             std::get_if<std::string>(&propertyMap.second);
                         if (severity == nullptr)
                         {
-                            messages::propertyMissing(asyncResp->res,
-                                                      "Severity");
+                            messages::internalError(asyncResp->res);
                         }
                     }
                     else if (propertyMap.first == "Message")
@@ -1605,8 +1599,7 @@
                         message = std::get_if<std::string>(&propertyMap.second);
                         if (message == nullptr)
                         {
-                            messages::propertyMissing(asyncResp->res,
-                                                      "Message");
+                            messages::internalError(asyncResp->res);
                         }
                     }
                 }