From 3940c652493302288052c772a6a5c00b70b5ae5b Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Tue, 5 Apr 2022 15:26:04 +0200 Subject: [PATCH] updated comment --- .../org/gcube/datatransfer/resolver/services/OatResolver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/OatResolver.java b/src/main/java/org/gcube/datatransfer/resolver/services/OatResolver.java index 67bf54a..0a372e1 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/OatResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/OatResolver.java @@ -59,7 +59,8 @@ public class OatResolver { LOG.info("returning legacy token {} for user {}", msgToken, username); return Response.ok(userToken).build(); } catch (Exception e) { - + LOG.error("Exception:", e); + if (!(e instanceof WebApplicationException)) { // UNEXPECTED EXCEPTION managing it as WebApplicationException String error = "Error occurred on getting legacy token. Please, contact the support!"; @@ -68,7 +69,6 @@ public class OatResolver { throw ExceptionManager.internalErrorException(req, error, this.getClass(), null); } // ALREADY MANAGED AS WebApplicationException - LOG.error("Exception:", e); throw (WebApplicationException) e; } }