diff --git a/cli/auth.go b/cli/auth.go index 286eb978b..e6eeace89 100644 --- a/cli/auth.go +++ b/cli/auth.go @@ -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 diff --git a/cli/pprof.go b/cli/pprof.go index 0da245910..ae4016e11 100644 --- a/cli/pprof.go +++ b/cli/pprof.go @@ -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 { diff --git a/cli/util/api.go b/cli/util/api.go index c2e250e27..4a7247b32 100644 --- a/cli/util/api.go +++ b/cli/util/api.go @@ -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)