Skip to content

Commit

Permalink
Merge 99af3e2 into 790ce2d
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmay-gupte committed Feb 19, 2015
2 parents 790ce2d + 99af3e2 commit 732635c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void handle(ChannelHandlerContext ctx, HttpRequest request) {
HttpMetricsIngestionHandler.sendResponse(ctx, request, null, HttpResponseStatus.OK);

} catch (JsonParseException ex) {
log.error("BAD JSON: %s", body);
log.debug(String.format("BAD JSON: %s", body));
log.error(ex.getMessage(), ex);
HttpMetricsIngestionHandler.sendResponse(ctx, request, ex.getMessage(), HttpResponseStatus.BAD_REQUEST);
} catch (ConnectionException ex) {
Expand All @@ -92,7 +92,8 @@ public void handle(ChannelHandlerContext ctx, HttpRequest request) {
} catch (TimeoutException ex) {
HttpMetricsIngestionHandler.sendResponse(ctx, request, "Timed out persisting metrics", HttpResponseStatus.ACCEPTED);
} catch (Exception ex) {
log.warn("Other exception while trying to parse content", ex);
log.debug(String.format("BAD JSON: %s", body));
log.error("Other exception while trying to parse content", ex);
HttpMetricsIngestionHandler.sendResponse(ctx, request, "Failed parsing content", HttpResponseStatus.INTERNAL_SERVER_ERROR);
} finally {
requestCount.dec();
Expand Down

0 comments on commit 732635c

Please sign in to comment.