NotFound (404) on Cosmos Query Execution
Shreekumar Suggamad
141
Reputation points
Getting the below error
Microsoft.Azure.Cosmos.CosmosException: 'Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: 9cb22e39-4d37-472e-b650-6033281e5585; Reason: (Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: 9cb22e39-4d37-472e-b650-6033281e5585; Reason: (Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: 9cb22e39-4d37-472e-b650-6033281e5585; Reason: (
Errors : [
"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"
]
);););'
On execution of the below code (at Line number 7)
public List<int> Run([ActivityTrigger] IDurableActivityContext inputs, ILogger log)
{
try
{
container = _repository.GetContainer();
var stores = container .Where(d =>
d.CreatedDate >= _yesterday.Date && d.CreatedDate < _today.Date
).ToList().DistinctBy(x => x.storeId).Select(s => s.storeId).ToList();
return stores;
}
catch (Exception ex)
{
log.LogError(ex, $"Error processing function.");
throw;
}
}
Sign in to answer