diff options
author | Ed Tanous <edtanous@google.com> | 2022-05-17 01:57:26 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-05-25 07:58:55 +0300 |
commit | 8868776ed92fa700a47acec609093dbf04221444 (patch) | |
tree | 6c33daadb369da68b9909d7dadf46915b6a373c8 /redfish-core/src/error_messages.cpp | |
parent | 3927e13ebcd7e4b30b64f7787f76c42b5c35d089 (diff) | |
download | bmcweb-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
Diffstat (limited to 'redfish-core/src/error_messages.cpp')
-rw-r--r-- | redfish-core/src/error_messages.cpp | 2 |
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()); } |