v5.12.0: Allow wrapping any error code, not just internal errors
- PR #229 adds the function
twirp.WrapError(twerr Error, err error) twirp.Error
, that returns the same Twirp error but wrapping the original error, that can can be unwrapped later (for example in middleware) usingerrors.Is
or(github.com/pkg/errors).Unwrap
.