Skip to content

Commit 27e70ce

Browse files
committed
chore: improve error messaging and add descriptions
1 parent a4e8c14 commit 27e70ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cli/sharing.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ func (r *RootCmd) shareWorkspace(orgContext *OrganizationContext) *serpent.Comma
3939
Options: serpent.OptionSet{
4040
{
4141
Name: "user",
42-
Description: "TODO.",
42+
Description: "A comma separated list of users to share the workspace with.",
4343
Flag: "user",
4444
Value: serpent.StringArrayOf(&users),
4545
}, {
4646
Name: "group",
47-
Description: "TODO.",
47+
Description: "A comma separated list of groups to share the workspace with.",
4848
Flag: "group",
4949
Value: serpent.StringArrayOf(&groups),
5050
},
@@ -56,7 +56,7 @@ func (r *RootCmd) shareWorkspace(orgContext *OrganizationContext) *serpent.Comma
5656
Handler: func(inv *serpent.Invocation) error {
5757
workspace, err := namedWorkspace(inv.Context(), client, inv.Args[0])
5858
if err != nil {
59-
return xerrors.Errorf("could not fetch the workspace %s.", inv.Args[0])
59+
return xerrors.Errorf("could not fetch the workspace %s: %w", inv.Args[0], err)
6060
}
6161

6262
userRoles := make(map[string]codersdk.WorkspaceRole, len(users))

0 commit comments

Comments
 (0)