improve get api error messages
This commit is contained in:
parent
6812c293b1
commit
adcb8f3b15
@ -123,7 +123,7 @@ var AuthApiInfoToken = &cli.Command{
|
||||
|
||||
ainfo, err := GetAPIInfo(cctx, t)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("could not get API info: %w", err)
|
||||
return xerrors.Errorf("could not get API info for %s: %w", t, err)
|
||||
}
|
||||
|
||||
// TODO: Log in audit log when it is implemented
|
||||
|
@ -34,7 +34,7 @@ var PprofGoroutines = &cli.Command{
|
||||
}
|
||||
ainfo, err := GetAPIInfo(cctx, t)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("could not get API info: %w", err)
|
||||
return xerrors.Errorf("could not get API info for %s: %w", t, err)
|
||||
}
|
||||
addr, err := ainfo.Host()
|
||||
if err != nil {
|
||||
|
@ -181,7 +181,7 @@ func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error) {
|
||||
func GetRawAPI(ctx *cli.Context, t repo.RepoType, version string) (string, http.Header, error) {
|
||||
ainfo, err := GetAPIInfo(ctx, t)
|
||||
if err != nil {
|
||||
return "", nil, xerrors.Errorf("could not get API info: %w", err)
|
||||
return "", nil, xerrors.Errorf("could not get API info for %s: %w", t, err)
|
||||
}
|
||||
|
||||
addr, err := ainfo.DialArgs(version)
|
||||
|
Loading…
Reference in New Issue
Block a user