From e5e3cb25ca4fc2e31c10eb3dbda8289c6bfc7140 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Fri, 29 Jul 2022 16:19:10 -0400 Subject: [PATCH] Improve concrete error message (#22536) --- sdks/go/pkg/beam/validate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdks/go/pkg/beam/validate.go b/sdks/go/pkg/beam/validate.go index 9987bfe5705e..2bc00fd547d6 100644 --- a/sdks/go/pkg/beam/validate.go +++ b/sdks/go/pkg/beam/validate.go @@ -71,8 +71,8 @@ func makeTypedefs(list []TypeDefinition) (map[string]reflect.Type, error) { if !typex.IsUniversal(v.Var) { return nil, errors.Errorf("type var %s must be a universal type", v.Var) } - if !typex.IsConcrete(v.T) { - return nil, errors.Errorf("type value %s must be a concrete type", v.T) + if ok, err := typex.CheckConcrete(v.T); !ok { + return nil, errors.Wrapf(err, "type value %s must be a concrete type", v.T) } typedefs[v.Var.Name()] = v.T }