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/lib/event_service.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'redfish-core/lib/event_service.hpp') diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp index 02bb21f898..28a7ac6b6d 100644 --- a/redfish-core/lib/event_service.hpp +++ b/redfish-core/lib/event_service.hpp @@ -375,7 +375,7 @@ inline void requestRoutesEventDestinationCollection(App& app) if (value == nullptr) { messages::propertyValueFormatError( - asyncResp->res, item.value().dump(2, 1), + asyncResp->res, item.value(), "HttpHeaders/" + item.key()); return; } @@ -614,7 +614,7 @@ inline void requestRoutesEventDestination(App& app) if (value == nullptr) { messages::propertyValueFormatError( - asyncResp->res, it.value().dump(2, ' ', true), + asyncResp->res, it.value(), "HttpHeaders/" + it.key()); return; } -- cgit v1.2.3