mirror of
https://github.com/valitydev/capi-v2.git
synced 2024-11-06 10:05:21 +00:00
MST-173: Support new merch_stat protocol (#194)
This commit is contained in:
parent
8fee9ff03c
commit
2a5255ecfe
@ -3328,13 +3328,8 @@ process_merchant_stat_result(StatType, Result) ->
|
||||
{ok, #merchstat_StatResponse{data = {'records', Stats}}} ->
|
||||
Resp = [decode_stat_info(StatType, S) || S <- Stats],
|
||||
{ok, {200, [], Resp}};
|
||||
{exception, Exception} ->
|
||||
case Exception of
|
||||
#'InvalidRequest'{errors = Errors} ->
|
||||
{ok, {400, [], logic_error(invalidRequest, format_request_errors(Errors))}};
|
||||
#merchstat_DatasetTooBig{limit = Limit} ->
|
||||
{ok, {400, [], limit_exceeded_error(Limit)}}
|
||||
end
|
||||
{exception, #'InvalidRequest'{errors = Errors}} ->
|
||||
{ok, {400, [], logic_error(invalidRequest, format_request_errors(Errors))}}
|
||||
end.
|
||||
|
||||
process_search_request(QueryType, Query, Req, Context, Opts = #{thrift_fun := ThriftFun}) ->
|
||||
@ -3354,13 +3349,8 @@ process_search_request_result(QueryType, Result, Context, #{decode_fun := Decode
|
||||
<<"totalCount">> => TotalCount
|
||||
},
|
||||
{ok, {200, [], Resp}};
|
||||
{exception, Exception} ->
|
||||
case Exception of
|
||||
#'InvalidRequest'{errors = Errors} ->
|
||||
{ok, {400, [], logic_error(invalidRequest, format_request_errors(Errors))}};
|
||||
#merchstat_DatasetTooBig{limit = Limit} ->
|
||||
{ok, {400, [], limit_exceeded_error(Limit)}}
|
||||
end
|
||||
{exception, #'InvalidRequest'{errors = Errors}} ->
|
||||
{ok, {400, [], logic_error(invalidRequest, format_request_errors(Errors))}}
|
||||
end.
|
||||
|
||||
get_time(Key, Req) ->
|
||||
|
@ -17,7 +17,7 @@
|
||||
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"1.0.2">>},1},
|
||||
{<<"dmsl">>,
|
||||
{git,"git@github.com:rbkmoney/damsel.git",
|
||||
{ref,"83d6c993d439aeb7d112da9d1cca0d217ced67fd"}},
|
||||
{ref,"17672372d8afb6af4571c0870bf3f9242253e4ef"}},
|
||||
0},
|
||||
{<<"erl_health">>,
|
||||
{git,"https://github.com/rbkmoney/erlang-health.git",
|
||||
|
Loading…
Reference in New Issue
Block a user