Skip to content

Match server twirp errors using errors.As - #323

Merged
marioizquierdo merged 8 commits into
mainfrom
match_twirp_error_with_errors_as
Jun 16, 2021
Merged

marioizquierdo merged 8 commits into
mainfrom
match_twirp_error_with_errors_as

Conversation

@marioizquierdo

@marioizquierdo marioizquierdo commented Jun 12, 2021 •

Copy link
Copy Markdown
Contributor

Fixes #300

Allow custom errors to present themselves as twirp.Errors using Go 1.11 errors.As.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@marioizquierdo

marioizquierdo commented Jun 12, 2021 •

Copy link
Copy Markdown
Contributor Author

Please check the release notes for v8.1.0 for safe update instructions. This change may expose unintentionally wrapped twirp errors inside other non-twirp errors that are returned as internal errors. Not very likely, but it could happen.

@marioizquierdo
marioizquierdo merged commit 0f99aaa into main Jun 16, 2021
@marioizquierdo
marioizquierdo deleted the match_twirp_error_with_errors_as branch June 16, 2021 07:29
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.

Support an optional ErrorCoder interface for Go servers

1 participant

⌂ 换网址