code: public static DbAccessException createDbAccessException(HttpResponse hr) {
  		JsonNode responseBody;
  		try {
              InputStream content = hr.getContent();
              if (content != null) {
                  responseBody = responseBodyAsNode(IOUtils.toString(content));
              } else {
                  responseBody = NullNode.getInstance();
              }
  		} catch (Exception e) {
  			responseBody = NullNode.getInstance();
  		}
  		switch (hr.getCode()) {
  		case HttpStatus.NOT_FOUND:
  			return new DocumentNotFoundException(hr.getRequestURI(), responseBody);
  		case HttpStatus.CONFLICT:
  			return new UpdateConflictException();
  		default:
  			String body;
  			try {
  				body = toPrettyString(responseBody);
  			} catch (IOException e) {
  				body = "unavailable";
  			}
  			return new DbAccessException(hr.toString() + "\nURI: " + hr.getRequestURI() + "\nResponse Body: \n" + body);
  		}
  	}
docs: Creates an DbAccessException which specific type is determined by the response code in the http response.
  @param hr
  @return