diff options
author | Ed Tanous <edtanous@google.com> | 2022-06-27 23:43:46 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-06-13 20:48:37 +0300 |
commit | 14fbced62e8e6e7e2d9c948f287fbde30721489a (patch) | |
tree | ed3f2ab2d73a1db6055ed67055dcf875d1c71610 /redfish-core/lib | |
parent | f818b04dad9601ca620a4afabadc83faa1c29735 (diff) | |
download | bmcweb-14fbced62e8e6e7e2d9c948f287fbde30721489a.tar.xz |
Make propertyValueIncorrect typesafe
Similar to the previous patches, make propertyValueIncorrect accept a
nlohmann::json object as input. This removes the need for the dump()
call, which oddly enough, in our one usage, was actually incorrect, and
could cause bmcweb to throw an exception in parsing in theory.
Tested: Only used in one error condition. Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie35d61101c2db88b16d42d71e66bceef540e8429
Diffstat (limited to 'redfish-core/lib')
-rw-r--r-- | redfish-core/lib/metric_report_definition.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp index 23e65f7418..e245a99862 100644 --- a/redfish-core/lib/metric_report_definition.hpp +++ b/redfish-core/lib/metric_report_definition.hpp @@ -705,9 +705,8 @@ class AddReport { metricProperties.emplace_back(uri); } - messages::propertyValueIncorrect(asyncResp->res, - metricProperties.dump(), - "MetricProperties"); + messages::propertyValueIncorrect( + asyncResp->res, metricProperties, "MetricProperties"); return; } if (ec) |