Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Go 1.13 error unwrapping #1802

Merged
merged 1 commit into from
Sep 24, 2020
Merged

Support Go 1.13 error unwrapping #1802

merged 1 commit into from
Sep 24, 2020

Conversation

uvw
Copy link
Contributor

@uvw uvw commented Sep 17, 2020

A little PR adding support for Go 1.13 errors.Unwrap to ConsumerError and ProducerError.

This feature might be particularly useful for generic error handling code, such as when propagating custom errors from Consumer.ConsumeClaim() or unit testing failure cases using mocks.

I considered extending other error structs in the codebase but they either do not surface external or custom errors; or are aggregated errors that cannot have an unambiguous Unwrap() result.

I am not sure what tests might be useful for this change. Please let me know if any tests are needed.

@uvw uvw requested a review from bai as a code owner September 17, 2020 18:58
@ghost ghost added the cla-needed label Sep 17, 2020
@ghost ghost removed the cla-needed label Sep 17, 2020
@uvw
Copy link
Contributor Author

uvw commented Sep 17, 2020

The CI error does not seem to be related to my change:

##[error]    async_producer_test.go:51: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)

I there a way I could re-run the CI job?

@bai
Copy link
Contributor

bai commented Sep 18, 2020

I there a way I could re-run the CI job?

I've triggered the retry, looks green now.

Copy link
Collaborator

@dnwe dnwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@bai bai merged commit 4e92ad6 into IBM:master Sep 24, 2020
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.

3 participants