minor refactoring
tronnet/workflows: Static Analysis -- Golang / static-go (push) Successful in 13s

This commit is contained in:
alu
2026-08-31 20:32:45 +00:00
parent 8b9c8c14d5
commit 30a4264bb1
8 changed files with 80 additions and 63 deletions
+15
View File
@@ -0,0 +1,15 @@
package pve
import (
"strings"
"github.com/luthermonson/go-proxmox"
)
func IsProxmoxNotFound(err error) bool {
if err != nil {
// for whatever reason proxmox returns 500 for user/group/pool not found
return proxmox.IsNotFound(err) || strings.Contains(err.Error(), "no such") || strings.Contains(err.Error(), "does not exist")
}
return false
}