Merge pull request #7088 from filecoin-project/nonsense/improve-get-api-error-msgs

This commit is contained in:
raulk 2021-08-16 14:38:58 +01:00 committed by GitHub
commit 0d7654d2c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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)