Closed apescione closed 4 years ago
Verified at our end, findById API is behaving correctly, but findById which takes partitionKey as well has this bug. Will fix it soon.
@ apescione This has been fixed and released in v2.1.9.
Will be fixed and released in v2.2.1.M2 in few days. .
This has been fixed in v2.2.1 as well. Closing this issue now.
Version: 2.1.8
Both APIs FindById and findByIdAndPartitionKey should return Optional#empty() when a Entity hasn't been found, instead, a DocumentDBAccessException is thrown.
Below the documentation for findByIdAndPartitionKey in com.microsoft.azure.spring.data.cosmosdb.repository.DocumentDbRepository<T, ID>
This behavior will force to catch always the exception when an entity is not found. DocumentDBAccessException may be thrown when other kind of errors occur.