MST-173: Support new merch_stat protocol (#194)

This commit is contained in:
Natalia Pulina 2018-04-25 16:40:54 +03:00 committed by GitHub
parent 8fee9ff03c
commit 2a5255ecfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 15 deletions

View File

@ -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) ->

View File

@ -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",