You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case(s) - what problem will this feature solve?
A client application using gRPC may wrap errors returned from invocations of the gRPC API to provide additional context to consuming code. If the error being wrapped and returned is a context error, it cannot be used with status.FromContextError, since the implementation checks that an error is exactly one of the sentinel values.
Proposed Solution
Re-implement status.FromContextError to use errors.Is instead of direct value equality. I think this should retain compatibility with existing behaviour while extending support for wrapped errors.
Alternatives Considered
None.
Additional Context
N/A.
The text was updated successfully, but these errors were encountered:
Use case(s) - what problem will this feature solve?
A client application using gRPC may wrap errors returned from invocations of the gRPC API to provide additional context to consuming code. If the error being wrapped and returned is a context error, it cannot be used with status.FromContextError, since the implementation checks that an error is exactly one of the sentinel values.
Proposed Solution
Re-implement status.FromContextError to use errors.Is instead of direct value equality. I think this should retain compatibility with existing behaviour while extending support for wrapped errors.
Alternatives Considered
None.
Additional Context
N/A.
The text was updated successfully, but these errors were encountered: