Skip to content

Commit a6aab52

Browse files
authored
TECH-81: Add new error to route reject (#150)
1 parent b03de9a commit a6aab52

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

apps/hellgate/src/hg_invoice_payment.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,6 +2700,8 @@ hold_limit_routes(Routes0, VS, Iter, St) ->
27002700
ok = hg_limiter:hold_payment_limits(TurnoverLimits, Invoice, Payment, PaymentRoute, Iter),
27012701
{[Route | LimitHeldRoutes], RejectedRoutes}
27022702
catch
2703+
error:(#limiter_LimitNotFound{} = LimiterError) ->
2704+
do_reject_route(LimiterError, Route, TurnoverLimits, Acc);
27032705
error:(#limiter_InvalidOperationCurrency{} = LimiterError) ->
27042706
do_reject_route(LimiterError, Route, TurnoverLimits, Acc);
27052707
error:(#limiter_OperationContextNotSupported{} = LimiterError) ->

apps/hellgate/src/hg_limiter.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ process_changes_try_wrap([LimitChange | OtherLimitChanges], WithFun, Clock, Cont
367367
handle_caught_exception(Class, Reason, Stacktrace, IgnoreBusinessError)
368368
end.
369369

370+
handle_caught_exception(error, #limiter_LimitNotFound{}, _Stacktrace, true) -> ok;
370371
handle_caught_exception(error, #limiter_InvalidOperationCurrency{}, _Stacktrace, true) -> ok;
371372
handle_caught_exception(error, #limiter_OperationContextNotSupported{}, _Stacktrace, true) -> ok;
372373
handle_caught_exception(error, #limiter_PaymentToolNotSupported{}, _Stacktrace, true) -> ok;

0 commit comments

Comments
 (0)