I am having an issue deleting a document form document db. The code is very trivial and I am not doing anything fancy. Basically I am getting the self link of the document and then using the self link to delete but it is giving me exception.
await client.DeleteDocumentAsync(entity.SelfLink, new RequestOptions() { PartitionKey = new PartitionKey(partitionKey) }).ConfigureAwait(false);
entity is a newly added document which exists in database (I have checked its existence from Azure Portal)
The exception I am getting:
Message: {"Errors":["Resource Not Found"]} ActivityId: 052ad225-4e04-4757-89b8-51f6ccf55f7c, Request URI: https://sy3prdddc05-docdb-1.documents.azure.com:15236/apps/0ee0095b-872d-45bc-8739-67cfbd97db79/services/466a4dd1-27d3-45ca-b013-6875f06a38ab/partitions/73e5c3d8-0332-4c0c-9aec-47a3469ba958/replicas/131354346050636923p//dbs/l29HAA==/colls/l29HAKZFJwA=/docs/l29HAKZFJwAfAAAAAAAAAA==
Any idea??
partitionKeyvalue matches with the value in the document you're trying to delete? - Gaurav Mantri