diff --git a/unifi/unifi.go b/unifi/unifi.go index 67b706f..b1e3d28 100644 --- a/unifi/unifi.go +++ b/unifi/unifi.go @@ -255,7 +255,7 @@ func (c *Client) do_versioned(ctx context.Context, version, method, relativeURL c.csrf = resp.Header.Get("X-Csrf-Token") } - if resp.StatusCode != http.StatusOK { + if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated { errBody := struct { Meta meta `json:"meta"` Data []struct {