summaryrefslogtreecommitdiff
path: root/redfish-core/include/error_messages.hpp
diff options
context:
space:
mode:
authorJiaqing Zhao <jiaqing.zhao@intel.com>2022-06-24 10:09:10 +0300
committerJiaqing Zhao <jiaqing.zhao@intel.com>2022-06-26 11:31:34 +0300
commit227a2b0a1e079067f34fe71ddefbf8da627e3a3d (patch)
treeb5301615fa69fc1acc5910627a68041da7c09ee5 /redfish-core/include/error_messages.hpp
parentf866686bff1446bb590174c90b00298a9e681beb (diff)
downloadbmcweb-227a2b0a1e079067f34fe71ddefbf8da627e3a3d.tar.xz
error_messages: Add PropertyValueOutOfRange error
The PropertyValueOutOfRange error indicates that a property was given the correct value type but the value of that property is outside the supported range. Tested: Build pass. Change-Id: I78d5e3142b41d6739e6b0ff4699e1c731c5981d7 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
Diffstat (limited to 'redfish-core/include/error_messages.hpp')
-rw-r--r--redfish-core/include/error_messages.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index ed00447ef6..f2b7d23b77 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -243,6 +243,21 @@ void propertyValueNotInList(crow::Response& res, std::string_view arg1,
std::string_view arg2);
/**
+ * @brief Formats PropertyValueOutOfRange message into JSON
+ * Message body: "The value '%1' for the property %2 is not in the supported
+ * range of acceptable values."
+ *
+ * @param[in] arg1 Parameter of message that will replace %1 in its body.
+ * @param[in] arg2 Parameter of message that will replace %2 in its body.
+ *
+ * @returns Message PropertyValueExternalConflict formatted to JSON */
+nlohmann::json propertyValueOutOfRange(std::string_view arg1,
+ std::string_view arg2);
+
+void propertyValueOutOfRange(crow::Response& res, std::string_view arg1,
+ std::string_view arg2);
+
+/**
* @brief Formats ResourceAtUriInUnknownFormat message into JSON
* Message body: "The resource at <arg1> is in a format not recognized by the
* service."