Skip to content

Commit

Permalink
Update internal/sdk/cloudian/sdk.go
Browse files Browse the repository at this point in the history
fix: error check in list users

Co-authored-by: Amund Tenstad <[email protected]>
  • Loading branch information
mariatsji and tenstad authored Nov 22, 2024
1 parent 1c25a64 commit b93b115
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/sdk/cloudian/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ func (client Client) ListUsers(groupId string, offsetUserId *string) ([]User, er

resp, err := client.httpClient.Do(req)

if err == nil {
if err != nil {
return fmt.Errorf("GET list users failed: %w", err)
}
body, err := io.ReadAll(resp.Body)
defer resp.Body.Close() // nolint:errcheck
if err != nil {
Expand Down

0 comments on commit b93b115

Please sign in to comment.