You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/12/07 10:56:29 UTC

[GitHub] [beam] kamilwu commented on a change in pull request #13484: [BEAM-11207] Return valid error on job failures

kamilwu commented on a change in pull request #13484:
URL: https://github.com/apache/beam/pull/13484#discussion_r537412845



##########
File path: sdks/go/pkg/beam/runners/universal/runnerlib/execute.go
##########
@@ -94,11 +94,16 @@ func Execute(ctx context.Context, p *pipepb.Pipeline, endpoint string, opt *JobO
 	}
 	err = WaitForCompletion(ctx, client, jobID)
 
-	res, err := newUniversalPipelineResult(ctx, jobID, client)
-	if err != nil {
-		return presult, err
+	res, presultErr := newUniversalPipelineResult(ctx, jobID, client)
+	if presultErr != nil {
+		if err != nil {
+			return presult, errors.Wrap(err, presultErr.Error())
+		} else {
+			return presult, presultErr
+		}
+	} else {
+		presult = res
 	}

Review comment:
       Thanks, this definitely looks better. I pushed fixes.




----------------------------------------------------------------
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:
users@infra.apache.org