From 22261146bef98c6d7a81bbbf9c34ba515141f7a6 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 18 Sep 2023 12:49:31 -0400 Subject: [PATCH] cmd/uplink: don't output stacktrace with unknown access A stacktrace is unnecessary for this error, so don't print one. https://github.com/storj/storj/issues/5910 Change-Id: Id9e5d9d188042cc7ac0dba571138d5f3e331a9d6 --- cmd/uplink/cmd_access_use.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/uplink/cmd_access_use.go b/cmd/uplink/cmd_access_use.go index 389ffbfd6..d55582f5e 100644 --- a/cmd/uplink/cmd_access_use.go +++ b/cmd/uplink/cmd_access_use.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/zeebo/clingy" - "github.com/zeebo/errs" "storj.io/storj/cmd/uplink/ulext" ) @@ -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