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
This commit is contained in:
parent
926076bffd
commit
22261146be
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user