diff --git a/lnrpc/routerrpc/router_server.go b/lnrpc/routerrpc/router_server.go index d6cd505d9..de64f92be 100644 --- a/lnrpc/routerrpc/router_server.go +++ b/lnrpc/routerrpc/router_server.go @@ -375,6 +375,13 @@ func (s *Server) SendToRouteV2(ctx context.Context, return rpcAttempt, nil } + // Transform user errors to grpc code. + if err == channeldb.ErrPaymentInFlight || + err == channeldb.ErrAlreadyPaid { + + return nil, status.Error(codes.AlreadyExists, err.Error()) + } + return nil, err }