changes to 204 status code handling

master
Uddhika Ishara 2 months ago
parent fe8b784cdf
commit 634763a6db

@ -104,7 +104,6 @@ public class HandlerUtil {
final HttpEntity responseEntity = response.getEntity();
ProxyResponse handlerResponse = new ProxyResponse();
int statusCode = response.getCode();
if (responseEntity == null) {
if (statusCode == 204) {
handlerResponse.setCode(statusCode);
handlerResponse.setStatus(ProxyResponse.Status.SUCCESS);
@ -112,6 +111,7 @@ public class HandlerUtil {
handlerResponse.setHeaders(response.getHeaders());
return handlerResponse;
}
if (responseEntity == null) {
log.error("Received null response for http request : " + httpRequest.getMethod() + " " + httpRequest.getRequestUri());
handlerResponse.setCode(HandlerConstants.INTERNAL_ERROR_CODE);
handlerResponse.setStatus(ProxyResponse.Status.ERROR);

Loading…
Cancel
Save