[ https://issues.apache.org/jira/browse/BEAM-7068?focusedWorklogId=228712&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-228712 ]
ASF GitHub Bot logged work on BEAM-7068: ---------------------------------------- Author: ASF GitHub Bot Created on: 16/Apr/19 22:04 Start Date: 16/Apr/19 22:04 Worklog Time Spent: 10m Work Description: lostluck commented on pull request #8298: [BEAM-7068] Improving error messages when binding functions in Go SDK URL: https://github.com/apache/beam/pull/8298#discussion_r276010757 ########## File path: sdks/go/pkg/beam/core/graph/edge.go ########## @@ -202,16 +202,16 @@ func NewCoGBK(g *Graph, s *Scope, ns []*Node) (*MultiEdge, error) { for i := 1; i < len(ns); i++ { n := ns[i] if !typex.IsKV(n.Type()) { - return nil, fmt.Errorf("input type must be KV: %v", n) + return nil, fmt.Errorf("creating new CoGBK in scope %v: input type must be KV: %v", s, n) Review comment: Mostly just a thought, No Action Required. Given an offline discussion, you've probably thought about this, but note how the context is identical for each of these errors. Having a dedicated error type could reduce the repetition of the context. The trick is embedding and ensuring there's data for the subsequent errors (eg with a more general approach with format strings and []interface{} args.) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 228712) Time Spent: 40m (was: 0.5h) > Improve error messages when binding functions > --------------------------------------------- > > Key: BEAM-7068 > URL: https://issues.apache.org/jira/browse/BEAM-7068 > Project: Beam > Issue Type: Sub-task > Components: sdk-go > Reporter: Daniel Oliveira > Assignee: Daniel Oliveira > Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > This bug covers error messages around the file core/graph/bind.go which binds > the inputs and outputs of functions to make sure all the types match up > properly. When DoFns are created with the wrong number of inputs/outputs or > wrong input/output types, this is where errors will usually originate from. -- This message was sent by Atlassian JIRA (v7.6.3#76005)