Skip to content

Conversation

@bajam-genetec
Copy link
Contributor

Description

  • I created an error wrapper in this repository to enable access from the pion/turn repository and my project.
  • These changes are based on the conversation of this PR.

Reference issue

Fixes pion/turn#467

@bajam-genetec bajam-genetec marked this pull request as ready for review October 22, 2025 21:34
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.83%. Comparing base (67c546f) to head (1dd1957).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
+ Coverage   64.94%   65.83%   +0.88%     
==========================================
  Files          27       27              
  Lines        2636     2072     -564     
==========================================
- Hits         1712     1364     -348     
+ Misses        913      697     -216     
  Partials       11       11              
Flag Coverage Δ
go 65.83% <100.00%> (+0.88%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JoeTurki JoeTurki merged commit 23c6311 into pion:master Oct 25, 2025
18 checks passed
@rg0now
Copy link

rg0now commented Oct 27, 2025

Maybe we should have called the error wrapper simply Error instead of TurnError. Turn looks a bit weird in the context of STUN plus we're going to import this as stun.Error anyway (stun.TurnError looks a bit weird on the caller side). Not that it matters that much

@JoeTurki
Copy link
Member

Maybe we should have called the error wrapper simply Error instead of TurnError. Turn looks a bit weird in the context of STUN plus we're going to import this as stun.Error anyway (stun.TurnError looks a bit weird on the caller side). Not that it matters that much

I thought about this, but I kinda like that this API gives a story for why it was there, and why it's used. it makes code more human IMO. It's currently only used by turn.

But i'm 50/50 on this If you think we should rename it, we can alias, deprecate it. or even remove it since no one probably ever used it 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose TURN Operation Response Codes for Error Handling and Alerting

3 participants