Skip to content

Conversation

floppyzedolfin
Copy link
Contributor

@floppyzedolfin floppyzedolfin commented Aug 18, 2025

An panic was raised in wrappedErrField.Error() when PingError was used without specifying the ErrorCodeReturned.
See #794 for a description of the original issue, with context.
It turns out it is possible to build a wrappedErrFields which has a wrappedErr == nil.

Changes

Added some safety nets in the calls accessing the err.wrappedErr field.

Verification

Added a unit test that covers the "usual" scenario (when the ErrorCodeReturned was properly set) and the edge-case scenario (when no ErrorCodeReturned was set).

Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

Thanks!

@johanbrandhorst johanbrandhorst merged commit 2338d5a into grpc-ecosystem:main Aug 19, 2025
5 checks passed
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