summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service
diff options
context:
space:
mode:
Diffstat (limited to 'sparkybe-onap-service')
-rw-r--r--sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateSummaryProcessor.java9
-rw-r--r--sparkybe-onap-service/src/main/java/org/onap/aai/sparky/search/filters/FilterProcessor.java3
2 files changed, 6 insertions, 6 deletions
diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateSummaryProcessor.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateSummaryProcessor.java
index a2df3b5..949c369 100644
--- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateSummaryProcessor.java
+++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/aggregatevnf/search/AggregateSummaryProcessor.java
@@ -68,7 +68,6 @@ public class AggregateSummaryProcessor {
HttpServletRequest request = exchange.getIn().getBody(HttpServletRequest.class);
ServletUtils.setUpMdcContext(exchange, request);
-
try {
String payload = exchange.getIn().getBody(String.class);
@@ -91,8 +90,8 @@ public class AggregateSummaryProcessor {
JSONObject zeroResponsePayload = new JSONObject();
zeroResponsePayload.put("count", 0);
- // response.setStatus(Status.SUCCESS_OK);
- // response.setEntity(zeroResponsePayload.toString(), MediaType.APPLICATION_JSON);
+ exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 200);
+ exchange.getOut().setHeader(Exchange.CONTENT_TYPE, "application/json");
exchange.getOut().setBody(zeroResponsePayload.toString());
LOG.error(AaiUiMsgs.ERROR_FILTERS_NOT_FOUND);
@@ -121,7 +120,9 @@ public class AggregateSummaryProcessor {
}
} catch (Exception exc) {
LOG.error(AaiUiMsgs.ERROR_GENERIC,
- "FilterProcessor failed to get filter list due to error = " + exc.getMessage());
+ "AggregateSummaryProcessor failed to process request due to error = " + exc.getMessage());
+
+
}
}
diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/search/filters/FilterProcessor.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/search/filters/FilterProcessor.java
index 62b8239..3cef322 100644
--- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/search/filters/FilterProcessor.java
+++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/search/filters/FilterProcessor.java
@@ -130,9 +130,8 @@ public class FilterProcessor {
// In the case of an error we want to respond with a valid empty response
if(wasErrorDuringFilterDiscovery || wasErrorDuringValueSearch) {
- //response.setStatus(Status.SUCCESS_OK);
- //response.setEntity(UiFiltersEntityConverter.generateEmptyResponse().toString(), MediaType.APPLICATION_JSON);
exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 404);
+ exchange.getOut().setHeader(Exchange.CONTENT_TYPE, "application/json");
exchange.getOut().setBody(UiFiltersEntityConverter.generateEmptyResponse().toString());
}
}