diff options
author | Sunitha Harish <sunithaharish04@gmail.com> | 2019-11-29 08:19:57 +0300 |
---|---|---|
committer | James Feist <james.feist@linux.intel.com> | 2019-12-06 20:18:04 +0300 |
commit | a78d3e618eb919a62731c54223e7851a912c9450 (patch) | |
tree | 97e88bb77b0dc19d560823c3fbaf2c74580f4203 /redfish-core/src/error_messages.cpp | |
parent | d82a3acd1abc04a13f90cef5234416c3e18da0e1 (diff) | |
download | bmcweb-a78d3e618eb919a62731c54223e7851a912c9450.tar.xz |
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
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 bc4cba6eec..0eda7b40a4 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{ |