Allow status.FromContextError to work with wrapped errors #4976
Closed
Description
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.