From 0c8e6b822c26afae4c607adf0ee93cbf7c055de3 Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Mon, 6 Jul 2020 12:56:54 -0400 Subject: [PATCH] fix: better error message for not found verfied client --- cmd/lotus-shed/verifreg.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/lotus-shed/verifreg.go b/cmd/lotus-shed/verifreg.go index a19cb261c..9b36a4c07 100644 --- a/cmd/lotus-shed/verifreg.go +++ b/cmd/lotus-shed/verifreg.go @@ -3,7 +3,9 @@ package main import ( "bytes" "fmt" + lapi "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" + "golang.org/x/xerrors" "github.com/filecoin-project/go-address" "github.com/urfave/cli/v2" @@ -301,6 +303,9 @@ var verifRegCheckClientCmd = &cli.Command{ dcap, err := api.StateVerifiedClientStatus(ctx, caddr, types.EmptyTSK) if err != nil { + if err == lapi.NotFoundErr { + return xerrors.Errorf("client %s is not a verified client", err) + } return err }