Skip to content

Commit 180b79a

Browse files
committed
check err
1 parent 3ed0c16 commit 180b79a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

internal/verifier/migration_verifier.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,17 @@ func (verifier *Verifier) getNamespaces(ctx context.Context, fieldName string) (
14961496
return nil, err
14971497
}
14981498
for _, v := range ret {
1499-
namespaces = append(namespaces, v.(string))
1499+
vStr, isStr := v.(string)
1500+
if !isStr {
1501+
return nil, fmt.Errorf(
1502+
"expected %#q in %#q to be %T but was %T",
1503+
fieldName,
1504+
verifier.verificationTaskCollection().Name(),
1505+
vStr,
1506+
v,
1507+
)
1508+
}
1509+
namespaces = append(namespaces, vStr)
15001510
}
15011511
return namespaces, nil
15021512
}

0 commit comments

Comments
 (0)