Closed
Description
When using errgroup.WithContext
, the first non-nil error encountered will cancel the context and then be returned by the next call to Wait
. This works well when you actually call Wait
, but if that canceled context prevents you from calling Wait
, you just get an unhelpful context canceled
error.
I believe the new context.WithCancelCause
added in 1.20 would fix this, so I propose we use that instead of this context.WithCancel
so we can propagate the error here, here, and here.