Skip to content

v5.12.0: Allow wrapping any error code, not just internal errors

Compare
Choose a tag to compare
@marioizquierdo marioizquierdo released this 11 Jun 04:40
  • 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) using errors.Is or (github.com/pkg/errors).Unwrap.