Skip to content

Commit

Permalink
fix(api): send head before writing response for /monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
ytvnr committed Feb 10, 2023
1 parent 55aa0a5 commit 3700dd0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public void handle(RoutingContext context) {

response.putHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
response.setChunked(true);
response.write(mapper.writeValueAsString(root));
response.setStatusCode(HttpStatusCode.OK_200);
response.write(mapper.writeValueAsString(root));
} catch (JsonProcessingException e) {
LOGGER.error("Unexpected error while generating monitoring", e);
response.setStatusCode(HttpStatusCode.INTERNAL_SERVER_ERROR_500);
Expand Down

0 comments on commit 3700dd0

Please sign in to comment.