Commit 025c44ff authored by Abhishek Patil's avatar Abhishek Patil
Browse files

handled AppException in getCosmosContainer method

parent 0836b7ee
Pipeline #14022 passed with stages
in 11 minutes and 28 seconds
......@@ -21,7 +21,7 @@
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<packaging>jar</packaging>
<version>0.0.38</version>
<version>0.0.39</version>
<name>core-lib-azure</name>
<properties>
......
......@@ -356,10 +356,10 @@ public class CosmosStore {
return cosmosClientFactory.getClient(dataPartitionId)
.getDatabase(cosmosDBName)
.getContainer(collection);
} catch (AppException ae) {
throw this.handleCosmosStoreException(ae.getError().getCode(), "Error creating creating Cosmos Client", ae);
} catch (Exception e) {
String errorMessage = "Error creating creating Cosmos Client";
LOGGER.warn(errorMessage, e);
throw new AppException(500, errorMessage, e.getMessage(), e);
throw this.handleCosmosStoreException(500, "Error creating creating Cosmos Client", 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