diff --git a/sdks/go/pkg/beam/core/graph/fn.go b/sdks/go/pkg/beam/core/graph/fn.go index 0dc19e176665..a37397977de1 100644 --- a/sdks/go/pkg/beam/core/graph/fn.go +++ b/sdks/go/pkg/beam/core/graph/fn.go @@ -1356,7 +1356,7 @@ func verifyValidNames(fnKind string, fn *Fn, names ...string) error { for key := range fn.methods { if !m[key] { - return errors.Errorf("%s: unexpected exported method %v present. Valid methods are: %v", fnKind, key, names) + return errors.Errorf("%s: unexpected exported method %v present on %v. Valid methods are: %v", fnKind, key, fn.Name(), names) } } return nil