]> git.proxmox.com Git - pve-client.git/blobdiff - PVE/APIClient/Helpers.pm
Handle errors on tasks correctly with a die,
[pve-client.git] / PVE / APIClient / Helpers.pm
index 7d855ec6ce58fc6775569fbb426c364dcc3f58bf..5c2e4cb661353b2284497cf0023b754a4f52963d 100644 (file)
@@ -355,6 +355,10 @@ sub poll_task {
        sleep(2);
     }
 
+    if ($task_status->{exitstatus} ne "OK") {
+       die $task_status->{exitstatus};
+    }
+
     return $task_status->{exitstatus};
 }