This commit is contained in:
appkins
2025-03-02 20:36:53 -06:00
parent d2a6a40fa3
commit 0760a33186
4 changed files with 10 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ package unifi
import (
"context"
"errors"
"fmt"
)
@@ -54,7 +55,7 @@ func (c *Client) CreateUser(ctx context.Context, site string, d *User) (*User, e
}
if len(respBody.Data) != 1 {
return nil, fmt.Errorf("malformed group response")
return nil, errors.New("malformed group response")
}
if err := respBody.Data[0].Meta.error(); err != nil {