PhilYue commented on a change in pull request #372:
URL: https://github.com/apache/dubbo-go-pixiu/pull/372#discussion_r815674108
##########
File path: pkg/common/grpc/manager.go
##########
@@ -99,6 +96,23 @@ func (gcm *GrpcConnectionManager) ServeHTTP(w
stdHttp.ResponseWriter, r *stdHttp
}
}
+func (gcm *GrpcConnectionManager) writeStatus(w stdHttp.ResponseWriter, status
*status.Status) error {
+ w.Header().Set("Grpc-Status", fmt.Sprintf("%d", status.Code()))
+ w.Header().Set("Grpc-Message", status.Message())
+ w.Header().Set("Content-Type", "application/grpc")
+
+ if p := status.Proto(); p != nil && len(p.Details) > 0 {
+ stBytes, err := proto.Marshal(p)
+ if err != nil {
+ panic(err)
Review comment:
这里可不可以返回错误描述, panic 有没有其他影响
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]