system: don't fail when Boot service isn't there
If the boot service isn't there, we shouldn't fail the response but omit
the Boot property.
Tested:
1. Service Validator passed on system without boot service
2. Service Validator passed on system with boot service
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Id3488f827736aa65d73e4a42082b279ca386ac3e
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 7180b09..3315a26 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -930,6 +930,10 @@
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
+ if (ec.value() == boost::asio::error::host_unreachable)
+ {
+ return;
+ }
messages::internalError(aResp->res);
return;
}
@@ -1014,6 +1018,10 @@
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
+ if (ec.value() == boost::asio::error::host_unreachable)
+ {
+ return;
+ }
messages::internalError(aResp->res);
return;
}