diff --git a/CHANGELOG.md b/CHANGELOG.md index eeafa2d1e..b13f496a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,6 +170,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements +* [\#11449](https://github.com/cosmos/cosmos-sdk/pull/11449) Improved error messages when node isn't synced. * [\#11349](https://github.com/cosmos/cosmos-sdk/pull/11349) Add `RegisterAminoMsg` function that checks that a msg name is <40 chars (else this would break ledger nano signing) then registers the concrete msg type with amino, it should be used for registering `sdk.Msg`s with amino instead of `cdc.RegisterConcrete`. * [\#11089](https://github.com/cosmos/cosmos-sdk/pull/11089]) Now cosmos-sdk consumers can upgrade gRPC to its newest versions. * [\#10439](https://github.com/cosmos/cosmos-sdk/pull/10439) Check error for `RegisterQueryHandlerClient` in all modules `RegisterGRPCGatewayRoutes`. diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 08b4a3d1e..41fd652dc 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -100,6 +100,18 @@ func GetAccountCmd() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) res, err := queryClient.Account(cmd.Context(), &types.QueryAccountRequest{Address: key.String()}) if err != nil { + node, err2 := clientCtx.GetNode() + if err2 != nil { + return err2 + } + status, err2 := node.Status(context.Background()) + if err2 != nil { + return err2 + } + catchingUp := status.SyncInfo.CatchingUp + if !catchingUp { + return errors.Wrapf(err, "your node may be syncing, please check node status using `/status`") + } return err }