diff options
author | Ed Tanous <edtanous@google.com> | 2022-02-08 00:30:00 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-02-14 23:25:49 +0300 |
commit | 0a4304cf40247771c63dc6be9b36d120a29fcb6d (patch) | |
tree | 7474ea9288160caa199441addfff7f50a72c7a3e /redfish-core/src/error_messages.cpp | |
parent | 0e46c8a472165ac46dc03de5e581c780c43602b7 (diff) | |
download | bmcweb-0a4304cf40247771c63dc6be9b36d120a29fcb6d.tar.xz |
Remove invalid base log message
The redfish base registry does not include a definition of this
message, which generating type-safe models has teased out. Replace the
MutuallyExclusiveProperties message with two "PropertyValueConflict"
messages. This seems like the closest thing, but in lieu of the things
not being in the standard, this seems like the best compromise.
Tested:
curl --insecure -X POST --user root:0penBmc
https://192.168.7.2/redfish/v1/EventService/Subscriptions -d
'{"MessageIds":[""],"RegistryPrefixes":[""],"Destination":"","Protocol":""}'
Returns:
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The property 'MessageIds' could not be written because its value would conflict with the value of the 'RegistryPrefixes' property.",
"MessageArgs": [
"MessageIds",
"RegistryPrefixes"
],
"MessageId": "Base.1.8.1.PropertyValueConflict",
"MessageSeverity": "Warning",
"Resolution": "No resolution is required."
}
],
"code": "Base.1.8.1.PropertyValueConflict",
"message": "The property 'MessageIds' could not be written because its value would conflict with the value of the 'RegistryPrefixes' property."
}
}
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1eaf4d06b6f5b85909392c48970e3f353af3a41e
Diffstat (limited to 'redfish-core/src/error_messages.cpp')
-rw-r--r-- | redfish-core/src/error_messages.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp index 599eeae3cd..5b5b696a1c 100644 --- a/redfish-core/src/error_messages.cpp +++ b/redfish-core/src/error_messages.cpp @@ -2150,35 +2150,6 @@ nlohmann::json invalidUpload(const std::string& arg1, const std::string& arg2) {"Resolution", "None."}}; } -/** - * @internal - * @brief Formats MutualExclusiveProperties into JSON - * - * See header file for more information - * @endinternal - */ -nlohmann::json mutualExclusiveProperties(const std::string& arg1, - const std::string& arg2) -{ - return nlohmann::json{ - {"@odata.type", "#Message.v1_1_1.Message"}, - {"MessageId", "Base.1.5.0.MutualExclusiveProperties"}, - {"Message", "The properties " + arg1 + " and " + arg2 + - " are mutually exclusive."}, - {"MessageArgs", {arg1, arg2}}, - {"MessageSeverity", "Warning"}, - {"Resolution", - "Ensure that the request body doesn't contain mutually exclusive " - "properties and resubmit the request."}}; -} - -void mutualExclusiveProperties(crow::Response& res, const std::string& arg1, - const std::string& arg2) -{ - res.result(boost::beast::http::status::bad_request); - addMessageToErrorJson(res.jsonValue, mutualExclusiveProperties(arg1, arg2)); -} - } // namespace messages } // namespace redfish |