Fix Error log entries to Warning
Some logging entries are categorized as ERROR, but they would better be
as WARNING.
1)
```
$ curl -k -X GET https://${bmc}:18080/redfish/v1/Managers/bmc/LogServices/Dump/Entries/INVALID
{
....
"code": "Base.1.13.0.InternalError",
"message": "The request failed due to an internal service error. The service is still operational."
}
}%
(2023-06-01 23:29:40) [ERROR "log_services.hpp":665] Can't find Dump Entry
(2023-06-01 23:29:40) [CRITICAL "error_messages.cpp":282] Internal Error \
../../../../../../../../../bmcweb/redfish-core/lib/log_services.hpp(666:36) \
`redfish::getDumpEntryById(const std::shared_ptr<bmcweb::AsyncResp>&, const std::string&, \
const std::string&)::<lambda(const boost::system::error_code&, const dbus::utility::ManagedObjectType&)>`:
```
2)
```
$ curl -k -X GET https://${bmc}:18080/redfish/v1/UpdateService/FirmwareInventory/INVALID
(2023-05-31 15:03:38) [ERROR "update_service.hpp":1010] Input swID X1cd6ce5fZ not found!
```
Tested:
- Set bmcweb-logging=error to obtain Error or higher logs
- Run the above commands and watch out logs
- Redfish validator passed and see whether there are unexpected error or higher level logs
Change-Id: I5f14eedd68fd3454cdf2a5b2f34442a7718e718a
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index ceb80d4..9ff3cdf 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -662,8 +662,9 @@
}
if (!foundDumpEntry)
{
- BMCWEB_LOG_ERROR << "Can't find Dump Entry";
- messages::internalError(asyncResp->res);
+ BMCWEB_LOG_WARNING << "Can't find Dump Entry " << entryID;
+ messages::resourceNotFound(asyncResp->res, dumpType + " dump",
+ entryID);
return;
}
},