From f818b04dad9601ca620a4afabadc83faa1c29735 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Mon, 27 Jun 2022 13:17:35 -0700 Subject: Make propertyValueFormatError more typesafe Similar to other patches, make propertyValueFormatError accept a nlohmann::json object, which removes a lot of the unsafe dump code that we have littered about. Tested: No easy to replicate error. Code is identical to previous patchsets. Inspection and code compilation only. Signed-off-by: Ed Tanous Change-Id: Ic9d0f196b6e198073189f744b738db7ffa2f1b74 --- redfish-core/include/error_messages.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'redfish-core/include') diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp index 77aa8958f8..a396603afe 100644 --- a/redfish-core/include/error_messages.hpp +++ b/redfish-core/include/error_messages.hpp @@ -248,10 +248,10 @@ void createFailedMissingReqProperties(crow::Response& res, * @param[in] arg2 Parameter of message that will replace %2 in its body. * * @returns Message PropertyValueFormatError formatted to JSON */ -nlohmann::json propertyValueFormatError(std::string_view arg1, +nlohmann::json propertyValueFormatError(const nlohmann::json& arg1, std::string_view arg2); -void propertyValueFormatError(crow::Response& res, std::string_view arg1, +void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1, std::string_view arg2); /** -- cgit v1.2.3