feature_23113 #4

Merged
francesco.mangiacrapa merged 58 commits from feature_23113 into master 2022-04-06 09:59:06 +02:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 3940c65249 - Show all commits

View File

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