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
When using wire for gRPC communication, I encountered an issue where I cannot access the trailers or headers of a gRPC call after it fails and throws a GrpcException. The exception itself provides valuable information about the failure, but I need to access additional details present in the trailers or headers for better error handling and logging purposes.
Steps to Reproduce:
Use Square's Wire library to make a gRPC call.
Wait for the call to fail and throw a GrpcException.
Attempt to access the trailers or headers associated with the failed call.
Expected Behavior:
After a gRPC call fails and throws a GrpcException, I should be able to access the trailers or headers of the failed call to retrieve additional information about the failure.
Actual Behavior:
Currently, when a gRPC call fails and throws a GrpcException, I have been unable to find a way to access the trailers or headers associated with the failed call. The exception itself provides useful details, but it would be beneficial to have access to the trailers or headers for more comprehensive error handling and logging.
Additional Information:
I am using Square's Wire library version 4.5.6.
I have reviewed the library's documentation, but couldn't find any specific information or examples regarding accessing trailers or headers after a failed gRPC call.
I have searched through the library's source code, but couldn't identify any methods or properties that expose the trailers or headers in the context of a GrpcException.
Possible Solution:
One possible solution to this issue could be to provide a way to access the trailers or headers associated with a gRPC call after it fails and throws a GrpcException. This could be achieved by exposing a method or property in the exception class that allows retrieving the trailers or headers. Something like this:
Issue Description:
When using wire for gRPC communication, I encountered an issue where I cannot access the trailers or headers of a gRPC call after it fails and throws a
GrpcException
. The exception itself provides valuable information about the failure, but I need to access additional details present in the trailers or headers for better error handling and logging purposes.Steps to Reproduce:
GrpcException
.Expected Behavior:
After a gRPC call fails and throws a
GrpcException
, I should be able to access the trailers or headers of the failed call to retrieve additional information about the failure.Actual Behavior:
Currently, when a gRPC call fails and throws a
GrpcException
, I have been unable to find a way to access the trailers or headers associated with the failed call. The exception itself provides useful details, but it would be beneficial to have access to the trailers or headers for more comprehensive error handling and logging.Additional Information:
GrpcException
.Possible Solution:
One possible solution to this issue could be to provide a way to access the trailers or headers associated with a gRPC call after it fails and throws a
GrpcException
. This could be achieved by exposing a method or property in the exception class that allows retrieving the trailers or headers. Something like this:and then, when converting
GrpcResponse
to aGrpcException
usingGrpcResponse.grpcResponseToException
, it set headers and trailers too.Alternatively, if there is already a way to access the trailers or headers I may have missed, please guide how to do so.
Thank you for your attention to this matter. Please let me know if further information is required to address this issue.
The text was updated successfully, but these errors were encountered: