diff options
Diffstat (limited to 'redfish-core/lib')
-rw-r--r-- | redfish-core/lib/ethernet.hpp | 28 | ||||
-rw-r--r-- | redfish-core/lib/event_service.hpp | 4 | ||||
-rw-r--r-- | redfish-core/lib/hypervisor_system.hpp | 14 | ||||
-rw-r--r-- | redfish-core/lib/managers.hpp | 5 |
4 files changed, 16 insertions, 35 deletions
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp index 411659d248..9aadaeab9d 100644 --- a/redfish-core/lib/ethernet.hpp +++ b/redfish-core/lib/ethernet.hpp @@ -1261,11 +1261,8 @@ inline void address, "SubnetMask", subnetMask, "Gateway", gateway)) { - messages::propertyValueFormatError( - asyncResp->res, - thisJson.dump(2, ' ', true, - nlohmann::json::error_handler_t::replace), - pathString); + messages::propertyValueFormatError(asyncResp->res, thisJson, + pathString); return; } @@ -1386,11 +1383,8 @@ inline void messages::resourceCannotBeDeleted(asyncResp->res); return; } - messages::propertyValueFormatError( - asyncResp->res, - thisJson.dump(2, ' ', true, - nlohmann::json::error_handler_t::replace), - pathString); + messages::propertyValueFormatError(asyncResp->res, thisJson, + pathString); return; } @@ -1455,11 +1449,8 @@ inline void handleIPv6StaticAddressesPatch( if (!json_util::readJson(thisJsonCopy, asyncResp->res, "Address", address, "PrefixLength", prefixLength)) { - messages::propertyValueFormatError( - asyncResp->res, - thisJson.dump(2, ' ', true, - nlohmann::json::error_handler_t::replace), - pathString); + messages::propertyValueFormatError(asyncResp->res, thisJson, + pathString); return; } @@ -1526,11 +1517,8 @@ inline void handleIPv6StaticAddressesPatch( messages::resourceCannotBeDeleted(asyncResp->res); return; } - messages::propertyValueFormatError( - asyncResp->res, - thisJson.dump(2, ' ', true, - nlohmann::json::error_handler_t::replace), - pathString); + messages::propertyValueFormatError(asyncResp->res, thisJson, + pathString); return; } 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; } diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp index 5a7105fc3e..52aeb4330a 100644 --- a/redfish-core/lib/hypervisor_system.hpp +++ b/redfish-core/lib/hypervisor_system.hpp @@ -588,11 +588,8 @@ inline void handleHypervisorIPv4StaticPatch( address, "SubnetMask", subnetMask, "Gateway", gateway)) { - messages::propertyValueFormatError( - asyncResp->res, - thisJson.dump(2, ' ', true, - nlohmann::json::error_handler_t::replace), - pathString); + messages::propertyValueFormatError(asyncResp->res, thisJson, + pathString); return; } @@ -893,11 +890,8 @@ inline void handleHypervisorEthernetInterfacePatch( // One and only one hypervisor instance supported if (ipv4Static.size() != 1) { - messages::propertyValueFormatError( - asyncResp->res, - ipv4Static.dump(2, ' ', true, - nlohmann::json::error_handler_t::replace), - "IPv4StaticAddresses"); + messages::propertyValueFormatError(asyncResp->res, ipv4Static, + "IPv4StaticAddresses"); return; } diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp index 362fdeff19..5bb4908262 100644 --- a/redfish-core/lib/managers.hpp +++ b/redfish-core/lib/managers.hpp @@ -707,7 +707,7 @@ inline bool if (config.empty()) { BMCWEB_LOG_ERROR << "Empty Zones"; - messages::propertyValueFormatError(response->res, "[]", "Zones"); + messages::propertyValueFormatError(response->res, config, "Zones"); return false; } for (auto& odata : config) @@ -727,8 +727,7 @@ inline bool { BMCWEB_LOG_ERROR << "Got invalid path " << path; BMCWEB_LOG_ERROR << "Illegal Type Zones"; - messages::propertyValueFormatError(response->res, odata.dump(), - "Zones"); + messages::propertyValueFormatError(response->res, odata, "Zones"); return false; } std::replace(input.begin(), input.end(), '_', ' '); |