Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remove not exist key got exception related to Resource Not Found #38

Merged
merged 3 commits into from Mar 8, 2021

Conversation

thohng
Copy link
Contributor

@thohng thohng commented Feb 17, 2021

To fix this issue: #37 when remove a not exist cache entry

Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: 970d262f-dfcf-4b01-8ec1-1a1f25ee18bb; Reason: ({
  "Errors": [
    "Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"
  ]
});
   at Microsoft.Azure.Cosmos.ResponseMessage.EnsureSuccessStatusCode()
   at Microsoft.Azure.Cosmos.CosmosResponseFactoryCore.ProcessMessage[T](ResponseMessage responseMessage, Func`2 createResponse)
   at Microsoft.Azure.Cosmos.CosmosResponseFactoryCore.CreateItemResponse[T](ResponseMessage responseMessage)
   at Microsoft.Azure.Cosmos.ContainerCore.DeleteItemAsync[T](CosmosDiagnosticsContext diagnosticsContext, String id, PartitionKey partitionKey, ItemRequestOptions requestOptions, CancellationToken cancellationToken)
   at Microsoft.Azure.Cosmos.ClientContextCore.RunWithDiagnosticsHelperAsync[TResult](CosmosDiagnosticsContext diagnosticsContext, Func`2 task)
   at Microsoft.Extensions.Caching.Cosmos.CosmosCache.RemoveAsync(String key, CancellationToken token)
....

@ghost
Copy link

ghost commented Feb 17, 2021

CLA assistant check
All CLA requirements met.

@ealsur
Copy link
Member

ealsur commented Mar 8, 2021

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@ealsur
Copy link
Member

ealsur commented Mar 8, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@ealsur
Copy link
Member

ealsur commented Mar 8, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@ealsur
Copy link
Member

ealsur commented Mar 8, 2021

@thohng Thanks for adding tests covering the scenario!

@ealsur ealsur merged commit 696e170 into Azure:master Mar 8, 2021
@thohng thohng deleted the fix-remove-not-exist-key branch March 9, 2021 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants