mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
Errwrap everywhere (#4252)
* package api * package builtin/credential * package builtin/logical * package command * package helper * package http and logical * package physical * package shamir * package vault * package vault * address feedback * more fixes
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/vault/api"
|
||||
"github.com/hashicorp/vault/helper/password"
|
||||
)
|
||||
@@ -42,12 +43,12 @@ func (h *CLIHandler) Auth(c *api.Client, m map[string]string) (*api.Secret, erro
|
||||
return nil, fmt.Errorf("user interrupted")
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("An error occurred attempting to "+
|
||||
return nil, errwrap.Wrapf("An error occurred attempting to "+
|
||||
"ask for a token. The raw error message is shown below, but usually "+
|
||||
"this is because you attempted to pipe a value into the command or "+
|
||||
"you are executing outside of a terminal (tty). If you want to pipe "+
|
||||
"the value, pass \"-\" as the argument to read from stdin. The raw "+
|
||||
"error was: %s", err)
|
||||
"error was: {{err}}", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user