Skip to content

Conversation

@MarkusPettersson98
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 commented Sep 17, 2025

This PR replaces the use of err-context for error message mangling with the well-maintained snafu crate. err-context has not seen updates in 6+ years. It is probably done, but it is a bit of an obscure relic from the past. snafu does what it does without adding to much bloat while being widely used & well-maintained.

This PR changes the format of some internal errors. If the output format of some internal error is important, we should add snapshot tests to cover that.

I base this PR on top of #77 due to https://github.com/mullvad/udp-over-tcp/actions/runs/17802660071/job/50606293583. If accepted, it should be merged to main.

This is the general format of domain specific errors generated by snafu

Error: <our specific domain error happened>

Caused by this error:
1: <source error, e.g. "No such file or directory (os error 2)">

Edit: If formatting these internal errors is not important at all, we might as well drop both err-context and snafu.


This change is Reviewable

Base automatically changed from chore/rust-2024 to main September 18, 2025 09:11
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.

2 participants