Commit 93afc761 authored by neelesh thakur's avatar neelesh thakur
Browse files

Merge branch 'log-version' into 'master'

log exception for not found record on read request

See merge request !76
parents c3f40bee d276983a
Pipeline #23380 passed with stages
in 7 minutes and 11 seconds
......@@ -20,7 +20,7 @@
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<packaging>jar</packaging>
<version>0.0.62</version>
<version>0.0.63</version>
<name>core-lib-azure</name>
<properties>
......
......@@ -110,11 +110,10 @@ public class CosmosStore {
T item = container.readItem(id, key, options, clazz).getItem();
return Optional.ofNullable((T) item);
} catch (NotFoundException e) {
LOGGER.warn(String.format("Unable to find item with ID=%s and PK=%s", id, partitionKey));
LOGGER.warn(String.format("Unable to find item with ID=%s and PK=%s", id, partitionKey), e);
return Optional.empty();
} catch (CosmosException e) {
String errorMessage;
errorMessage = "Unexpectedly encountered error calling CosmosDB";
String errorMessage = "Unexpectedly encountered error calling CosmosDB";
LOGGER.warn(errorMessage, e);
throw new AppException(500, errorMessage, e.getMessage(), e);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment