From 5d633a1fd5a60b4930c78528e4a68e6fbb17fae7 Mon Sep 17 00:00:00 2001 From: mleone87 Date: Sun, 19 Mar 2023 20:03:34 +0100 Subject: [PATCH] better error handling --- proxmox/provider.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proxmox/provider.go b/proxmox/provider.go index b7fd9199..8ac2ff84 100644 --- a/proxmox/provider.go +++ b/proxmox/provider.go @@ -221,9 +221,8 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { if err != nil { return nil, err } - permlist, err2 := client.GetUserPermissions(userID, "/") - if err2 != nil { - err = fmt.Errorf("user does not exist or has insufficient permissions on proxmox: %s\n the error is: %s", userID.ToString(), err2) + permlist, err := client.GetUserPermissions(userID, "/") + if err != nil { return nil, err } sort.Strings(permlist)