diff --git a/apps/hellgate/src/hg_invoice_payment.erl b/apps/hellgate/src/hg_invoice_payment.erl index c02fea77..f535e617 100644 --- a/apps/hellgate/src/hg_invoice_payment.erl +++ b/apps/hellgate/src/hg_invoice_payment.erl @@ -2700,6 +2700,8 @@ hold_limit_routes(Routes0, VS, Iter, St) -> ok = hg_limiter:hold_payment_limits(TurnoverLimits, Invoice, Payment, PaymentRoute, Iter), {[Route | LimitHeldRoutes], RejectedRoutes} catch + error:(#limiter_LimitNotFound{} = LimiterError) -> + do_reject_route(LimiterError, Route, TurnoverLimits, Acc); error:(#limiter_InvalidOperationCurrency{} = LimiterError) -> do_reject_route(LimiterError, Route, TurnoverLimits, Acc); error:(#limiter_OperationContextNotSupported{} = LimiterError) -> diff --git a/apps/hellgate/src/hg_limiter.erl b/apps/hellgate/src/hg_limiter.erl index e05601cc..2ed16f12 100644 --- a/apps/hellgate/src/hg_limiter.erl +++ b/apps/hellgate/src/hg_limiter.erl @@ -367,6 +367,7 @@ process_changes_try_wrap([LimitChange | OtherLimitChanges], WithFun, Clock, Cont handle_caught_exception(Class, Reason, Stacktrace, IgnoreBusinessError) end. +handle_caught_exception(error, #limiter_LimitNotFound{}, _Stacktrace, true) -> ok; handle_caught_exception(error, #limiter_InvalidOperationCurrency{}, _Stacktrace, true) -> ok; handle_caught_exception(error, #limiter_OperationContextNotSupported{}, _Stacktrace, true) -> ok; handle_caught_exception(error, #limiter_PaymentToolNotSupported{}, _Stacktrace, true) -> ok;