summaryrefslogtreecommitdiff
path: root/redfish-core/lib
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-06-27 23:43:46 +0300
committerEd Tanous <ed@tanous.net>2023-06-13 20:48:37 +0300
commit14fbced62e8e6e7e2d9c948f287fbde30721489a (patch)
treeed3f2ab2d73a1db6055ed67055dcf875d1c71610 /redfish-core/lib
parentf818b04dad9601ca620a4afabadc83faa1c29735 (diff)
downloadbmcweb-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.hpp5
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)