Fixed logs

This commit is contained in:
Francesco Mangiacrapa 2023-03-23 17:24:09 +01:00
parent 28ce7ae589
commit 1107c69b47
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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