Skip to content

Commit

Permalink
graph/group: wrap errors
Browse files Browse the repository at this point in the history
  • Loading branch information
evenh committed Jun 28, 2019
1 parent aeba0ad commit dbde7fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azuread/helpers/graph/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func GroupAddMember(client graphrbac.GroupsClient, ctx context.Context, groupId

log.Printf("[DEBUG] Adding member with id %q to Azure AD group with id %q", member, groupId)
if _, err := client.AddMember(ctx, groupId, properties); err != nil {
return err
return fmt.Errorf("Error adding group member %q to Azure AD Group with ID %q: %+v", member, groupId, err)
}

return nil
Expand All @@ -68,7 +68,7 @@ func GroupAddMembers(client graphrbac.GroupsClient, ctx context.Context, groupId
err := GroupAddMember(client, ctx, groupId, memberUuid)

if err != nil {
return err
return fmt.Errorf("Error while adding members to Azure AD Group with ID %q: %+v", groupId, err)
}
}

Expand Down

0 comments on commit dbde7fb

Please sign in to comment.