diff --git a/gravitee-node-monitoring/src/main/java/io/gravitee/node/monitoring/monitor/NodeMonitorManagementEndpoint.java b/gravitee-node-monitoring/src/main/java/io/gravitee/node/monitoring/monitor/NodeMonitorManagementEndpoint.java index 1c144d7e4..ed7368239 100644 --- a/gravitee-node-monitoring/src/main/java/io/gravitee/node/monitoring/monitor/NodeMonitorManagementEndpoint.java +++ b/gravitee-node-monitoring/src/main/java/io/gravitee/node/monitoring/monitor/NodeMonitorManagementEndpoint.java @@ -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);