From 1107c69b479d85d7db41f4903fac42a112de9f8d Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Thu, 23 Mar 2023 17:24:09 +0100 Subject: [PATCH] Fixed logs --- .../datatransfer/resolver/services/CatalogueResolver.java | 8 +++++--- .../datatransfer/resolver/services/GeoportalResolver.java | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java b/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java index 0dbd969..06baae6 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/CatalogueResolver.java @@ -132,7 +132,8 @@ public class CatalogueResolver { if (!(e instanceof WebApplicationException)) { // UNEXPECTED EXCEPTION managing it as WebApplicationException - String error = "Error occurred on resolving the Catalgoue URL. Please, contact the support!"; + String error = "Error occurred on resolving the " + CatalogueResolver.class.getSimpleName() + + " URL. Please, contact the support!"; if (e.getCause() != null) error += "\n\nCaused: " + e.getCause().getMessage(); throw ExceptionManager.internalErrorException(req, error, this.getClass(), helpURI); @@ -207,14 +208,15 @@ public class CatalogueResolver { linkURL += "?" + jsonRequest.getQuery_string(); } - logger.info("Returning "+CatalogueResolver.class.getSimpleName()+" URL: " + linkURL); + logger.info("Returning " + CatalogueResolver.class.getSimpleName() + " URL: " + linkURL); return Response.ok(linkURL).header("Location", linkURL).build(); } catch (Exception e) { if (!(e instanceof WebApplicationException)) { // UNEXPECTED EXCEPTION managing it as WebApplicationException - String error = "Error occurred on resolving the Analytics URL. Please, contact the support!"; + String error = "Error occurred on creating the " + CatalogueResolver.class.getSimpleName() + + " URL. Please, contact the support!"; throw ExceptionManager.internalErrorException(req, error, this.getClass(), helpURI); } // ALREADY MANAGED AS WebApplicationExceptiongetItemCatalogueURLs diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java index 49acb0a..073ae76 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalResolver.java @@ -177,7 +177,7 @@ public class GeoportalResolver { if (!(e instanceof WebApplicationException)) { // UNEXPECTED EXCEPTION managing it as WebApplicationException - String error = "Error occurred on resolving the Catalgoue URL. Please, contact the support!"; + String error = "Error occurred on resolving the "+GeoportalResolver.class.getSimpleName()+" URL. Please, contact the support!"; if (e.getCause() != null) error += "\n\nCaused: " + e.getCause().getMessage(); throw ExceptionManager.internalErrorException(req, error, this.getClass(), helpURI); @@ -281,7 +281,7 @@ public class GeoportalResolver { if (!(e instanceof WebApplicationException)) { // UNEXPECTED EXCEPTION managing it as WebApplicationException - String error = "Error occurred on resolving the Analytics URL. Please, contact the support!"; + String error = "Error occurred on creating the "+GeoportalResolver.class.getSimpleName()+" URL. Please, contact the support!"; throw ExceptionManager.internalErrorException(req, error, this.getClass(), helpURI); } // ALREADY MANAGED AS WebApplicationExceptiongetItemCatalogueURLs