summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redfish-core/include/error_messages.hpp9
-rw-r--r--redfish-core/src/error_messages.cpp19
2 files changed, 28 insertions, 0 deletions
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index d9f571c76b..1a5b94132d 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -1018,6 +1018,15 @@ nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2);
void invalidUpload(crow::Response& res, std::string_view arg1,
std::string_view arg2);
+/**
+ * @brief Formats InsufficientStorage message into JSON
+ * Message body: "Insufficent storage or memory available to complete the
+ * request."
+ * @returns Message InsufficientStorage formatted to JSON */
+nlohmann::json insufficientStorage();
+
+void insufficientStorage(crow::Response& res);
+
} // namespace messages
} // namespace redfish
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index cdaced6246..654353d783 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -1673,6 +1673,24 @@ void invalidUpload(crow::Response& res, std::string_view arg1,
/**
* @internal
+ * @brief Formats InsufficientStorage message into JSON
+ *
+ * See header file for more information
+ * @endinternal
+ */
+nlohmann::json insufficientStorage()
+{
+ return getLog(redfish::registries::base::Index::insufficientStorage, {});
+}
+
+void insufficientStorage(crow::Response& res)
+{
+ res.result(boost::beast::http::status::insufficient_storage);
+ addMessageToErrorJson(res.jsonValue, insufficientStorage());
+}
+
+/**
+ * @internal
* @brief Formats Invalid File message into JSON
*
* See header file for more information
@@ -1693,6 +1711,7 @@ nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2)
{"MessageSeverity", "Warning"},
{"Resolution", "None."}};
}
+
} // namespace messages
} // namespace redfish