Skip to content

Commit

Permalink
cmd/uplink: don't output stacktrace with unknown access
Browse files Browse the repository at this point in the history
A stacktrace is unnecessary for this error, so don't print one.

#5910

Change-Id: Id9e5d9d188042cc7ac0dba571138d5f3e331a9d6
  • Loading branch information
cam-a authored and Storj Robot committed Sep 20, 2023
1 parent 926076b commit 2226114
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/uplink/cmd_access_use.go
Expand Up @@ -8,7 +8,6 @@ import (
"fmt"

"github.com/zeebo/clingy"
"github.com/zeebo/errs"

"storj.io/storj/cmd/uplink/ulext"
)
Expand All @@ -33,7 +32,7 @@ func (c *cmdAccessUse) Execute(ctx context.Context) error {
return err
}
if _, ok := accesses[c.access]; !ok {
return errs.New("unknown access: %q", c.access)
return fmt.Errorf("ERROR: access %q does not exist. Use 'uplink access list' to see existing accesses", c.access)
}
if err := c.ex.SaveAccessInfo(c.access, accesses); err != nil {
return err
Expand Down

0 comments on commit 2226114

Please sign in to comment.