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.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index abc817d443..64b5abb8bb 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -478,14 +478,16 @@ void createFailedMissingReqProperties(crow::Response& res,
* See header file for more information
* @endinternal
*/
-nlohmann::json propertyValueFormatError(std::string_view arg1,
+nlohmann::json propertyValueFormatError(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::propertyValueFormatError,
- std::to_array({arg1, arg2}));
+ std::to_array<std::string_view>({arg1Str, arg2}));
}
-void propertyValueFormatError(crow::Response& res, std::string_view arg1,
+void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1,
std::string_view arg2)
{
res.result(boost::beast::http::status::bad_request);