Replace err-context with snafu
#79
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces the use of
err-contextfor error message mangling with the well-maintainedsnafucrate.err-contexthas not seen updates in 6+ years. It is probably done, but it is a bit of an obscure relic from the past.snafudoes 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
snafuEdit: If formatting these internal errors is not important at all, we might as well drop both
err-contextandsnafu.This change is