File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 55 "io"
66 "net/http"
77
8+ any "github.com/golang/protobuf/ptypes/any"
89 "google.golang.org/grpc/codes"
910)
1011
@@ -101,8 +102,9 @@ func (e *ProxyError) WriteJSON(w io.Writer) error {
101102
102103// GRPCError is an error returned by gRPC upstream
103104type GRPCError struct {
104- StatusCode int `json:"code"`
105- Message string `json:"message"`
105+ StatusCode int `json:"code"`
106+ Message string `json:"message"`
107+ Details []* any.Any `json:"details,omitempty"`
106108}
107109
108110// HTTPStatusCode converts gRPC status codes to HTTP status codes
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ func (s *stubImpl) InvokeRPC(
6464 return nil , & errors.GRPCError {
6565 StatusCode : int (stat .Code ()),
6666 Message : stat .Message (),
67+ Details : stat .Proto ().Details ,
6768 }
6869 }
6970 outputMsg := invocation .MethodDescriptor .GetOutputType ().NewMessage ()
You can’t perform that action at this time.
0 commit comments