Improve the Redfish error reporting interface
Makes the Redfish error reporting interface automatically handle
setting the http status and JSON content in the response object.
When using an AsyncResp object, this allows for simply calling
the Redfish error and returning.
Change-Id: Icfdce2de763225f070e8dd61e591f296703f46bb
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/redfish-core/lib/thermal.hpp b/redfish-core/lib/thermal.hpp
index a845385..0f4e840 100644
--- a/redfish-core/lib/thermal.hpp
+++ b/redfish-core/lib/thermal.hpp
@@ -47,7 +47,7 @@
{
if (params.size() != 1)
{
- res.result(boost::beast::http::status::internal_server_error);
+ messages::internalError(res);
res.end();
return;
}