sdk-go icon indicating copy to clipboard operation
sdk-go copied to clipboard

Temporal breaks context error handling

Open Hades32 opened this issue 1 year ago • 2 comments

ctx, cancel := context.WithTimeout(cctx, 2*time.Second)
defer cancel()
wf := tClient.GetWorkflow(ctx, wfID, "")
err := wf.Get(ctx, &res)
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
	fmt.Println("timeout")
} else {
	fmt.Println("no timeout")
}

Expected Behavior

Should print "timeout"

Actual Behavior

Prints "no timeout"

Hades32 avatar Jan 19 '23 14:01 Hades32