CP-40842: Report host action as failed when connection isn't possible

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
Danilo Del Busso 2023-02-14 11:20:32 +00:00 committed by Konstantina Chremmou
parent f885be7e4d
commit 653d66cb10

View File

@ -84,7 +84,11 @@ namespace XenAdmin.Actions
log.DebugFormat("Getting system status for {0} on {1}", entries_string, hostname);
if (Session == null)
throw new Exception(Messages.CONNECTION_IO_EXCEPTION);
{
Status = ReportStatus.failed;
Error = new Exception(Messages.CONNECTION_IO_EXCEPTION);
throw Error;
}
try
{