diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java index 447b12c..5611a3b 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/statusmanager/config/kafka/oauth2/CustomAuthenticateCallbackHandler.java @@ -75,11 +75,8 @@ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallback OAuthBearerToken token = getOAuthBearerToken(); OAuthBearerTokenCallback oauthCallback = (OAuthBearerTokenCallback) callback; oauthCallback.token(token); - } catch (InterruptedException e){ - Thread.currentThread().interrupt(); - throw new BusinessException("Thread was interrupted while handling callback", e); - } catch (ExecutionException | TimeoutException e) { - throw new BusinessException("Error while handling callback"); + } catch (InterruptedException | ExecutionException | TimeoutException e) { + e.printStackTrace(); } } else { throw new UnsupportedCallbackException(callback);