diff options
| author | James Feist <james.feist@linux.intel.com> | 2019-02-21 10:57:24 -0800 |
|---|---|---|
| committer | Ed Tanous <ed.tanous@intel.com> | 2019-03-01 20:47:48 +0000 |
| commit | be12c7291914b8a6dd7d6e78f1a500708b0f20f9 (patch) | |
| tree | ed0b2b2d4e6bc9fc835068a3ff653497e9b531ed /redfish-core/src | |
| parent | c33a90ec049bc82054106bd4e09381797df72002 (diff) | |
| download | bmcweb-be12c7291914b8a6dd7d6e78f1a500708b0f20f9.tar.gz bmcweb-be12c7291914b8a6dd7d6e78f1a500708b0f20f9.zip | |
Don't set result to success when calling success
res.success is the default, if one async call
sets failure, and another later sets success, we
don't want to overwrite the failure with sucess.
Tested-by: still got success on good patch
Change-Id: Iee76892f7517d508ed98929d9ecd127dd83b1329
Signed-off-by: James Feist <james.feist@linux.intel.com>
Diffstat (limited to 'redfish-core/src')
| -rw-r--r-- | redfish-core/src/error_messages.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp index 7c29507..5b10937 100644 --- a/redfish-core/src/error_messages.cpp +++ b/redfish-core/src/error_messages.cpp @@ -1013,7 +1013,8 @@ void generalError(crow::Response& res) */ void success(crow::Response& res) { - res.result(boost::beast::http::status::ok); + // don't set res.result here because success is the default and any error + // should overwrite the default addMessageToJsonRoot( res.jsonValue, nlohmann::json{ |

