mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-26 04:16:51 +00:00
fix: narrow exception catches in PingGuestAgent and ImportPveOvaCmdlet
Co-authored-by: GoodOlClint <151449+GoodOlClint@users.noreply.github.com> Agent-Logs-Url: https://github.com/GoodOlClint/PSProxmoxVE/sessions/e7930807-5536-4c55-96f8-0712aee44e00
This commit is contained in:
@@ -550,8 +550,9 @@ namespace PSProxmoxVE.Core.Services
|
||||
client.PostAsync($"nodes/{Uri.EscapeDataString(node)}/qemu/{vmid}/agent/ping").GetAwaiter().GetResult();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex) when (ex is not OutOfMemoryException and not StackOverflowException)
|
||||
catch (PSProxmoxVE.Core.Exceptions.PveApiException)
|
||||
{
|
||||
// Treat API-level failures for this endpoint as "guest agent not responding".
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user