From 0fbec14dc84053525939d0dd8b9bcb1743107d1c Mon Sep 17 00:00:00 2001 From: Geoff Cant Date: Tue, 16 Apr 2013 17:29:04 -0700 Subject: [PATCH] Specifically ignore msg count mismatch errors. --- src/logplex_logs_rest.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/logplex_logs_rest.erl b/src/logplex_logs_rest.erl index 3d68d1a4..0c1c792d 100644 --- a/src/logplex_logs_rest.erl +++ b/src/logplex_logs_rest.erl @@ -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),