|
|
|
@ -2,9 +2,10 @@ package grpc |
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
"context" |
|
|
|
|
|
|
|
|
|
"gitea.drugeyes.vip/pharnexbase/utils/enum" |
|
|
|
|
"gitea.drugeyes.vip/pharnexbase/utils/glog/v1" |
|
|
|
|
"github.com/go-kratos/kratos/v2/errors" |
|
|
|
|
"github.com/go-kratos/kratos/v2/log" |
|
|
|
|
"google.golang.org/grpc" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
@ -50,7 +51,7 @@ func (i *Interceptor) UnaryServerInterceptor() grpc.UnaryServerInterceptor { |
|
|
|
|
} |
|
|
|
|
// 正式服,统一返回“服务错误”
|
|
|
|
|
err = ErrInternalServer |
|
|
|
|
log.Errorf("InterServerErr:%v", se) |
|
|
|
|
glog.Glog.WithContext(ctx).Errorf("InnServerErr: %v", se) |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|