summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-05-17 01:57:26 +0300
committerEd Tanous <ed@tanous.net>2022-05-25 07:58:55 +0300
commit8868776ed92fa700a47acec609093dbf04221444 (patch)
tree6c33daadb369da68b9909d7dadf46915b6a373c8
parent3927e13ebcd7e4b30b64f7787f76c42b5c35d089 (diff)
downloadbmcweb-8868776ed92fa700a47acec609093dbf04221444.tar.xz
Change operationFailed to return 502
Redfish base registry for operation failed says: "Indicates that one of the internal operations necessary to complete the request failed. Examples of this are when an internal service provider is unable to complete the request, such as in aggregation or RDE." In terms of return codes, this translates to 502, Bad Gateway, given that we're talking about proxy behavior here. There is currently one usage of messages::operationFailed, which arguably should've used internalErrror, and will be fixed in the next patchset. Tested: Code compiles. No (correct) users. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iff20e04d4f297b9f6595039f76321d0927f86c4d
-rw-r--r--redfish-core/src/error_messages.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 95bbea79b1..df62230208 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -889,7 +889,7 @@ nlohmann::json operationFailed(void)
void operationFailed(crow::Response& res)
{
- res.result(boost::beast::http::status::internal_server_error);
+ res.result(boost::beast::http::status::bad_gateway);
addMessageToErrorJson(res.jsonValue, operationFailed());
}