Skip to content

Commit

Permalink
Merge pull request #26 from ConductorOne/ggreer/log-more-error
Browse files Browse the repository at this point in the history
Log more errors about setting workspace roles.
  • Loading branch information
ggreer authored Jul 9, 2024
2 parents e996329 + 01dd138 commit 919a9df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/slack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ type Client struct {
}

type BaseResponse struct {
Ok bool `json:"ok"`
Error string `json:"error"`
Ok bool `json:"ok"`
Error string `json:"error"`
Needed string `json:"needed"`
Provided string `json:"provided"`
}

type Pagination struct {
Expand Down Expand Up @@ -343,7 +345,7 @@ func (c *Client) SetWorkspaceRole(ctx context.Context, teamID, userID, roleID st
}

if res.Error != "" {
return fmt.Errorf("error setting user role: %v", res.Error)
return fmt.Errorf("error setting user role: error %v needed %v provided %v", res.Error, res.Needed, res.Provided)
}

return nil
Expand Down

0 comments on commit 919a9df

Please sign in to comment.