From d133241dbda21ba7b0eb7a626d6783f90196f8ad Mon Sep 17 00:00:00 2001 From: Maor Date: Wed, 26 Dec 2018 09:55:35 +0200 Subject: [PATCH] [cain/cqlsh] add descriptive error message for describe schema error --- pkg/cain/cqlsh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cain/cqlsh.go b/pkg/cain/cqlsh.go index fca4a1c..853f9f1 100644 --- a/pkg/cain/cqlsh.go +++ b/pkg/cain/cqlsh.go @@ -40,7 +40,7 @@ func DescribeKeyspaceSchema(iK8sClient interface{}, namespace, pod, container, k command := []string{fmt.Sprintf("DESC %s;", keyspace)} schema, err := Cqlsh(iK8sClient, namespace, pod, container, command) if err != nil { - return nil, "", err + return nil, "", fmt.Errorf("Could not describe schema. make sure a schema exists for keyspace \"%s\". %s", keyspace, err) } h := sha256.New() h.Write(schema)