Update content of ResourceNotFound/ResourceAlreadyExists message
According to Redfish Base Message Registry definition [1], the first
argument of ResourceNotFound and ResourceAlreadyExists is the schema
name of the resource. This patch changes the first argument to non-
versioned schema name treewide.
Tested:
Verified the error message matches the definition, and Redfish Service
Validator passed.
[1] https://redfish.dmtf.org/registries/Base.1.13.0.json
Change-Id: Ib5cd853578ef0bffda1184d10827241e94faaf68
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index c2a3dd6..ebd9436 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -634,7 +634,7 @@
if (ec)
{
BMCWEB_LOG_ERROR << "DBUS response error: " << ec;
- messages::resourceNotFound(asyncResp->res, name, certId);
+ messages::resourceNotFound(asyncResp->res, "Certificate", certId);
return;
}
@@ -818,7 +818,8 @@
if (ec.value() ==
boost::system::linux_error::bad_request_descriptor)
{
- messages::resourceNotFound(asyncResp->res, name, id);
+ messages::resourceNotFound(asyncResp->res, "Certificate",
+ id);
return;
}
messages::internalError(asyncResp->res);
@@ -1203,8 +1204,7 @@
[asyncResp, id](const boost::system::error_code ec) {
if (ec)
{
- messages::resourceNotFound(asyncResp->res,
- "TrustStore Certificate", id);
+ messages::resourceNotFound(asyncResp->res, "Certificate", id);
return;
}
BMCWEB_LOG_INFO << "Certificate deleted";