Skip to content

Commit

Permalink
better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mleone87 committed Mar 19, 2023
1 parent c844b42 commit 5d633a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions proxmox/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5d633a1

Please sign in to comment.