String revision = document.getDocumentRevision();
WriteResponse deleteResponse = new DeleteDocumentRequest(this, DeleteDocumentRequest.Type.DOCUMENT, id, revision)
.execute();
if (deleteResponse.isError()) {
String msg = String.format("Error deleting document %s rev(%s) - %s", id, revision, deleteResponse.getErrorReason());
throw new CouchException(deleteResponse.getStatusCode(), msg);
}
}
}
couchHttpResponse = CouchHttpResponse.builder(CouchMethodType.DELETE, httpClient.uri(path), CouchHttpStatus.OK).build();
return new WriteResponse(couchHttpResponse);