Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Specifically ignore msg count mismatch errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
archaelus committed Apr 17, 2013
1 parent 9e941a8 commit 0fbec14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/logplex_logs_rest.erl
Expand Up @@ -154,6 +154,10 @@ process_post(Req, State = #state{token = Token,
when Token =:= any, ChannelId =:= any ->
logplex_message:process_msgs(Msgs),
{true, Req2, State2#state{msgs = []}};
{{error, msg_count_mismatch}, Req2, State2} ->
%% XXX - Add stat counter here?
{ok, Req3} = cowboy_http_req:reply(400, Req2),
{halt, Req3, State2};
{{error, Reason}, Req2, State2} when is_integer(ChannelId) ->
?WARN("at=parse_logplex_body channel_id=~p error=~p", [ChannelId, Reason]),
{ok, Req3} = cowboy_http_req:reply(400, Req2),
Expand Down

0 comments on commit 0fbec14

Please sign in to comment.