error when user handler returns not micro.Error or proto.Message error
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
4da14b61c1
commit
1741eece94
7
grpc.go
7
grpc.go
@ -579,11 +579,8 @@ func (g *grpcServer) processStream(stream grpc.ServerStream, service *service, m
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
g.RLock()
|
if g.opts.Logger.V(logger.ErrorLevel) {
|
||||||
config := g.opts
|
g.opts.Logger.Error(g.opts.Context, "handler error will not be transferred properly, must return *errors.Error or proto.Message")
|
||||||
g.RUnlock()
|
|
||||||
if config.Logger.V(logger.ErrorLevel) {
|
|
||||||
config.Logger.Warn(config.Context, "handler error will not be transferred properly, must return *errors.Error or proto.Message")
|
|
||||||
}
|
}
|
||||||
// default case user pass own error type that not proto based
|
// default case user pass own error type that not proto based
|
||||||
statusCode = convertCode(verr)
|
statusCode = convertCode(verr)
|
||||||
|
Loading…
Reference in New Issue
Block a user