Return service name in error
This commit is contained in:
parent
4469a41ae7
commit
4c95c65d81
@ -193,7 +193,7 @@ func (g *grpcServer) handler(srv interface{}, stream grpc.ServerStream) (err err
|
|||||||
logger.Error("panic recovered: ", r)
|
logger.Error("panic recovered: ", r)
|
||||||
logger.Error(string(debug.Stack()))
|
logger.Error(string(debug.Stack()))
|
||||||
}
|
}
|
||||||
err = errors.InternalServerError("go.micro.server", "panic recovered: %v", r)
|
err = errors.InternalServerError(g.opts.Name, "panic recovered: %v", r)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ func (g *grpcServer) handler(srv interface{}, stream grpc.ServerStream) (err err
|
|||||||
if g.opts.Router != nil {
|
if g.opts.Router != nil {
|
||||||
cc, err := g.newGRPCCodec(ct)
|
cc, err := g.newGRPCCodec(ct)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.InternalServerError("go.micro.server", err.Error())
|
return errors.InternalServerError(g.opts.Name, err.Error())
|
||||||
}
|
}
|
||||||
codec := &grpcCodec{
|
codec := &grpcCodec{
|
||||||
method: fmt.Sprintf("%s.%s", serviceName, methodName),
|
method: fmt.Sprintf("%s.%s", serviceName, methodName),
|
||||||
@ -362,7 +362,7 @@ func (g *grpcServer) processRequest(stream grpc.ServerStream, service *service,
|
|||||||
|
|
||||||
cc, err := g.newGRPCCodec(ct)
|
cc, err := g.newGRPCCodec(ct)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.InternalServerError("go.micro.server", err.Error())
|
return errors.InternalServerError(g.opts.Name, err.Error())
|
||||||
}
|
}
|
||||||
b, err := cc.Marshal(argv.Interface())
|
b, err := cc.Marshal(argv.Interface())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user