protected CompletableFuture<OperationOutcome> postProcessResponse(OperationOutcome outcome, String url,
Response rawResponse, String response) {
- logger.info("{}: caching response for {}", getFullName(), params.getRequestId());
- params.getContext().setProperty(AaiCqResponse.CONTEXT_KEY, new AaiCqResponse(response));
+ if (params.getContext() != null) {
+ logger.info("{}: caching response for {}", getFullName(), params.getRequestId());
+ params.getContext().setProperty(AaiCqResponse.CONTEXT_KEY, new AaiCqResponse(response));
+ }
return super.postProcessResponse(outcome, url, rawResponse, response);
}
Response rawResponse, StandardCoderObject response) {
String entity = params.getTargetEntity();
- logger.info("{}: caching response of {} for {}", getFullName(), entity, params.getRequestId());
-
- params.getContext().setProperty(propertyPrefix + entity, response);
+ if (params.getContext() != null) {
+ logger.info("{}: caching response of {} for {}", getFullName(), entity, params.getRequestId());
+ params.getContext().setProperty(propertyPrefix + entity, response);
+ }
return super.postProcessResponse(outcome, url, rawResponse, response);
}