Add EventBufferExceeded message
This is a method that exists in the base registry that we will use in
the next commit.
Tested: Code compiles. Code is not yet used.
Change-Id: I02e81371adeb8d3e2c2515a8af94b9a1ac0973a9
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index b692eda..64ce9cb 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -949,6 +949,17 @@
void queryCombinationInvalid(crow::Response& res);
/**
+ * @brief Formats EventBufferExceeded message into JSON
+ * Message body: "Indicates undelivered events may have been lost due to a lack
+ * of buffer space in the service."
+ *
+ *
+ * @returns Message QueryCombinationInvalid formatted to JSON */
+nlohmann::json eventBufferExceeded();
+
+void eventBufferExceeded(crow::Response& res);
+
+/**
* @brief Formats InsufficientPrivilege message into JSON
* Message body: "There are insufficient privileges for the account or
* credentials associated with the current session to perform the requested
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 8729383..205da96 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -1616,6 +1616,24 @@
/**
* @internal
+ * @brief Formats EventBufferExceeded message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json eventBufferExceeded()
+{
+ return getLog(redfish::registries::base::Index::eventBufferExceeded, {});
+}
+
+void eventBufferExceeded(crow::Response& res)
+{
+ res.result(boost::beast::http::status::bad_request);
+ addMessageToErrorJson(res.jsonValue, eventBufferExceeded());
+}
+
+/**
+ * @internal
* @brief Formats InsufficientPrivilege message into JSON
*
* See header file for more information