summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunitha Harish <sunithaharish04@gmail.com>2019-11-28 23:19:57 -0600
committerJames Feist <james.feist@linux.intel.com>2019-12-06 17:18:04 +0000
commita78d3e618eb919a62731c54223e7851a912c9450 (patch)
tree97e88bb77b0dc19d560823c3fbaf2c74580f4203
parentd82a3acd1abc04a13f90cef5234416c3e18da0e1 (diff)
downloadbmcweb-a78d3e618eb919a62731c54223e7851a912c9450.tar.gz
bmcweb-a78d3e618eb919a62731c54223e7851a912c9450.zip
Fix response error code for error - Unauthorized
Tested by: Request: Creating session with wrong credential. curl --insecure -X POST -D headers.txt https://${BMC_IP}/redfish/v1/SessionService/Sessions -d '{"UserName":"root", "Password":"penBmc"}' Resonse Error code: HTTP/1.1 401 Unauthorized Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: I9c7b0af644f1e3d987b4f76e4206bbb276aba035
-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 bc4cba6..0eda7b4 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -251,7 +251,7 @@ void unrecognizedRequestBody(crow::Response& res)
void resourceAtUriUnauthorized(crow::Response& res, const std::string& arg1,
const std::string& arg2)
{
- res.result(boost::beast::http::status::forbidden);
+ res.result(boost::beast::http::status::unauthorized);
addMessageToErrorJson(
res.jsonValue,
nlohmann::json{
OpenPOWER on IntegriCloud