openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
154 stars 131 forks source link

A bad LogEntryId returns an internal Error instead of 404 / resourceNotFound #191

Closed gtmills closed 3 years ago

gtmills commented 3 years ago
 curl -k -X DELETE  https://$bmc/redfish/v1/Systems/system/LogServices/EventLog/Entries/198274391874
 Internal Server Error
  curl -k -X DELETE -v https://$bmc/redfish/v1/Systems/system/LogServices/EventLog/Entries/198274391874
....
> DELETE /redfish/v1/Systems/system/LogServices/EventLog/Entries/198274391874 HTTP/1.1
....
< HTTP/1.1 500 Internal Server Error

See https://github.com/openbmc/bmcweb/blob/master/COMMON_ERRORS.md#11-not-responding-to-404

https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/log_services.hpp#L671

I'm sure we have this many more places, just where I noticed

gtmills commented 3 years ago

https://github.com/openbmc/bmcweb/commit/3de8d8ba2880173fac03c949d9fae035442549ee Fixed this. I'm sure we have other places but can track separately.