summaryrefslogtreecommitdiff
path: root/redfish-core/src/error_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/src/error_messages.cpp')
-rw-r--r--redfish-core/src/error_messages.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 6c4282cc67..7b0251562d 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -1453,6 +1453,29 @@ void actionParameterValueTypeError(crow::Response& res,
/**
* @internal
+ * @brief Formats actionParameterValueError message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
+ std::string_view arg2)
+{
+ std::string arg1Str = arg1.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
+ return getLog(redfish::registries::base::Index::actionParameterValueError,
+ std::to_array<std::string_view>({arg1Str, arg2}));
+}
+
+void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1,
+ std::string_view arg2)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, actionParameterValueError(arg1, arg2));
+}
+
+/**
+ * @internal
* @brief Formats SessionLimitExceeded message into JSON
*
* See header file for more information