at throwing exception
Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: Iffbaaddea9c9bb1609ce2e0755f6f3ca49e0ad31
}
// Get here on an error response (4XX-5XX)
- throw new CloudifyResponseException(httpResponse.getStatusLine().getReasonPhrase(),
- httpResponse.getStatusLine().getStatusCode(), httpClientResponse);
+ if (httpResponse != null) {
+ throw new CloudifyResponseException(httpResponse.getStatusLine().getReasonPhrase(),
+ httpResponse.getStatusLine().getStatusCode(), httpClientResponse);
+ } else {
+ throw new CloudifyResponseException("Null httpResponse", 0, httpClientResponse);
+ }
}
}