// serverInterceptor will intercept the all the grpc unary calls and add the error to grpc trailer
serverInterceptor will intercept the all the grpc unary calls and add the error to grpc trailer
// serverInterceptor will intercept the all the grpc unary calls and add the error to grpc trailer
func serverInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
	if info == nil {
		return nil, errors.New("passed nil *grpc.UnaryServerInfo")
	}
	resp, err := handler(ctx, req)
	err = errorservice.MarshalError(err, ctx)
	return resp, err
}
func serverInterceptor ( ctx context . Context , req interface { } , info * grpc . UnaryServerInfo , handler grpc . UnaryHandler ) ( interface { } , error ) { if info == nil { return nil , errors . New ( " " ) } resp , err := handler ( ctx , req ) err = errorservice . MarshalError ( err , ctx ) return resp , err }
serverInterceptor will intercept the all the grpc unary calls and add the error to grpc trailer
serverInterceptor will intercept the all the grpc unary calls and add the error to grpc trailer
// Marshall error and add to ctx