diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java index 85a9895..05bc75e 100644 --- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java +++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/engine/mongo/ProfiledMongoManager.java @@ -1292,8 +1292,8 @@ public class ProfiledMongoManager extends MongoManager implements MongoManagerI< log.info("ignore_errors is {}, returning input doc {}", ignore_errors, doc.getId()); return doc; } - log.info("Thrown "+ConfigurationException.class.getSimpleName()+" with message {}", filesetExc.getMessage()); - throw new ConfigurationException(filesetExc.getMessage()); + log.info("Thrown "+WebApplicationException.class.getSimpleName()+" with message {}", filesetExc.getMessage()); + throw new WebApplicationException(error, Response.Status.BAD_REQUEST); }