public HttpClientStatusCodeException(String serviceId, HttpResponse response, HttpEntity entity, URI uri) throws IOException {
super(serviceId, response.getStatusLine().getStatusCode(), response, uri);
this.response = new BasicHttpResponse(response.getStatusLine());
this.response.setLocale(response.getLocale());
this.response.setStatusCode(response.getStatusLine().getStatusCode());
this.response.setReasonPhrase(response.getStatusLine().getReasonPhrase());
this.response.setHeaders(response.getAllHeaders());
EntityUtils.updateEntity(this.response, entity);
}