diff options
Diffstat (limited to 'redfish-core')
-rw-r--r-- | redfish-core/include/error_messages.hpp | 8 | ||||
-rw-r--r-- | redfish-core/lib/metric_report_definition.hpp | 2 | ||||
-rw-r--r-- | redfish-core/src/error_messages.cpp | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp index 09ac36eb2c..7adae19c87 100644 --- a/redfish-core/include/error_messages.hpp +++ b/redfish-core/include/error_messages.hpp @@ -491,11 +491,11 @@ void propertyValueExternalConflict(crow::Response& res, std::string_view arg1, * @param[in] arg2 Parameter of message that will replace %2 in its body. * * @returns Message PropertyValueIncorrect formatted to JSON */ -nlohmann::json propertyValueIncorrect(const nlohmann::json& arg1, - std::string_view arg2); +nlohmann::json propertyValueIncorrect(std::string_view arg1, + const nlohmann::json& arg2); -void propertyValueIncorrect(crow::Response& res, const nlohmann::json& arg1, - std::string_view arg2); +void propertyValueIncorrect(crow::Response& res, std::string_view arg1, + const nlohmann::json& arg2); /** * @brief Formats ResourceCreationConflict message into JSON diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp index 6ad9f117d2..43a1849c28 100644 --- a/redfish-core/lib/metric_report_definition.hpp +++ b/redfish-core/lib/metric_report_definition.hpp @@ -737,7 +737,7 @@ class AddReport metricProperties.emplace_back(uri); } messages::propertyValueIncorrect( - asyncResp->res, metricProperties, "MetricProperties"); + asyncResp->res, "MetricProperties", metricProperties); return; } if (ec) diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp index 7bbd877409..3c628b6579 100644 --- a/redfish-core/src/error_messages.cpp +++ b/redfish-core/src/error_messages.cpp @@ -860,17 +860,17 @@ void propertyValueExternalConflict(crow::Response& res, std::string_view arg1, * See header file for more information * @endinternal */ -nlohmann::json propertyValueIncorrect(const nlohmann::json& arg1, - std::string_view arg2) +nlohmann::json propertyValueIncorrect(std::string_view arg1, + const nlohmann::json& arg2) { - std::string arg1Str = arg1.dump(2, ' ', true, + std::string arg2Str = arg2.dump(2, ' ', true, nlohmann::json::error_handler_t::replace); return getLog(redfish::registries::base::Index::propertyValueIncorrect, - std::to_array<std::string_view>({arg1Str, arg2})); + std::to_array<std::string_view>({arg1, arg2Str})); } -void propertyValueIncorrect(crow::Response& res, const nlohmann::json& arg1, - std::string_view arg2) +void propertyValueIncorrect(crow::Response& res, std::string_view arg1, + const nlohmann::json& arg2) { res.result(boost::beast::http::status::bad_request); addMessageToErrorJson(res.jsonValue, propertyValueIncorrect(arg1, arg2)); |