Closed marioizquierdo closed 3 years ago
Thanks for sending this PR! I will review this today.
It's not clear to me that this new interface is required, or how the patterns it enables are different or better than what errors.As provides. I gave a specific example in https://github.com/twitchtv/twirp/issues/300#issuecomment-849826338.
closing in favor of #323 323
Issue #300
Allow errors returned by service handlers to implement a different interface
twirp.Erroer
to be serialized as Twirp errors.The interface doesn't need to be exported, but having it exported documents the alternative better and makes the option more explicit.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.