Return 503 instead of 500 when Crashdump is busy
Tested:
Used Postman to send the OnDemand action twice and got a 503 with
a retry message on the second attempt.
Change-Id: I319a6318ee57e504a54b3fdb6894a5aeb43af203
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 3eb4097..1447f21 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1970,6 +1970,12 @@
{
messages::resourceInStandby(asyncResp->res);
}
+ else if (ec.value() ==
+ boost::system::errc::device_or_resource_busy)
+ {
+ messages::serviceTemporarilyUnavailable(asyncResp->res,
+ "60");
+ }
else
{
messages::internalError(asyncResp->res);