diff options
author | Alex Schendel <alex.schendel@intel.com> | 2023-02-03 21:43:19 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-02-03 22:37:52 +0300 |
commit | 4ef82a1505c1dc04c289dabba5e7e4e47f53900c (patch) | |
tree | 1fce4aeacf46c0ced2847944fac45ac014eb0be6 /redfish-core/src | |
parent | 43e14d38178f6e9a362d2f066a05fecd41503d84 (diff) | |
download | bmcweb-4ef82a1505c1dc04c289dabba5e7e4e47f53900c.tar.xz |
Add Support for ActionParameterNotInList Message
This commit adds support for the ActionParameterNotInList Redfish DMTF
error message.
Change-Id: I7fd9b7c952e7ffa4c7c4c585ae28315b40556a21
Signed-off-by: Alex Schendel <alex.schendel@intel.com>
Diffstat (limited to 'redfish-core/src')
-rw-r--r-- | redfish-core/src/error_messages.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp index bee3140685..77531f0a7c 100644 --- a/redfish-core/src/error_messages.cpp +++ b/redfish-core/src/error_messages.cpp @@ -244,6 +244,30 @@ void actionParameterValueFormatError(crow::Response& res, std::string_view arg1, /** * @internal + * @brief Formats ActionParameterValueNotInList message into JSON + * + * See header file for more information + * @endinternal + */ +nlohmann::json actionParameterValueNotInList(std::string_view arg1, + std::string_view arg2, + std::string_view arg3) +{ + return getLog( + redfish::registries::base::Index::actionParameterValueNotInList, + std::to_array({arg1, arg2, arg3})); +} + +void actionParameterValueNotInList(crow::Response& res, std::string_view arg1, + std::string_view arg2, std::string_view arg3) +{ + res.result(boost::beast::http::status::bad_request); + addMessageToErrorJson(res.jsonValue, + actionParameterValueNotInList(arg1, arg2, arg3)); +} + +/** + * @internal * @brief Formats InternalError message into JSON * * See header file for more information |