Skip to content

Commit

Permalink
Simplify 'call_w_request'
Browse files Browse the repository at this point in the history
  • Loading branch information
nanodirijabl committed Nov 24, 2024
1 parent 2ad8bd5 commit 0e2e312
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/ff_transfer/src/ff_limiter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,8 @@ mk_limit_log_attributes(#limiter_LimitContext{
}
}.

call_w_request(Function, LimitRequest, Context) ->
Service = {limproto_limiter_thrift, 'Limiter'},
Args = {LimitRequest, Context},
Request = {Service, Function, Args},
case ff_woody_client:call(limiter, Request) of
call_w_request(Function, Request, Context) ->
case call(Function, {Request, Context}) of
{exception, #limiter_LimitNotFound{}} ->
error(not_found);
{exception, #base_InvalidRequest{errors = Errors}} ->
Expand Down

0 comments on commit 0e2e312

Please sign in to comment.