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
We wrap errors in transport/http in a similar way to the proposed, but I'm not convinced it actually brings any value. Does anyone actually switch calling code behavior based on the returned err.Domain? If not, I would vote for removing context altogether, and returning the raw
error. Thoughts?
I didn't get any strong pushback on the thread; any thoughts here?
There is a situation that I want to retrieve grpc error not fmt.Errorf and looking at the code https://github.com/go-kit/kit/blob/master/transport/grpc/client.go#L93 is returning fmt.Errorf, is there any idiomatic way to retrieve grpc error type when invoking the rpc?
Looking at https://github.com/grpc/grpc-go/blob/master/rpc_util.go#L363 grpc has a method to retrieve error message, we can return an error struct containing grpc error, the struct will be ex.
at gokit change will be:
return nil, &rpcError{rpc: err, err: fmt.Errorf("Invoke: %v", err)}
at consumer will be:
Just an idea, what do you think?
The text was updated successfully, but these errors were encountered: