Switch to context.Cause instead of context's Error for richer error contexts
Author: JoTurkCreated Jun 5, 2026Updated Jul 3, 2026
This issue tracks the suggestion from @sirzooro to switch all Pion context APIs to use context.Cause so users can have richer context with cancelled contexts.
This should be applied across Pion libraries and enforced via lint so we don't have surprises or different behaviors. And we maybe this should be done in a major or at least minor release because it's a breaking change.
Source: pion/webrtc