diff --git a/go/cmd/vtctldclient/command/schema.go b/go/cmd/vtctldclient/command/schema.go index 4715835d66b..9622febc141 100644 --- a/go/cmd/vtctldclient/command/schema.go +++ b/go/cmd/vtctldclient/command/schema.go @@ -388,6 +388,10 @@ func commandValidateSchemaKeyspace(cmd *cobra.Command, args []string) error { return err } + if len(resp.Results) > 0 { + return fmt.Errorf("%s", resp.Results[0]) + } + data, err := cli.MarshalJSON(resp) if err != nil { return err diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 275437343ea..3709e3a3b8b 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -4801,6 +4801,7 @@ func (s *VtctldServer) ValidateSchemaKeyspace(ctx context.Context, req *vtctldat defer panicHandler(&err) span.Annotate("keyspace", req.Keyspace) + span.Annotate("shards", req.Shards) keyspace := req.Keyspace resp = &vtctldatapb.ValidateSchemaKeyspaceResponse{