diff --git a/metadata-service/auth-impl/src/main/java/com/datahub/authentication/token/StatefulTokenService.java b/metadata-service/auth-impl/src/main/java/com/datahub/authentication/token/StatefulTokenService.java index b35ad32ee88ab..19efd4f6139f5 100644 --- a/metadata-service/auth-impl/src/main/java/com/datahub/authentication/token/StatefulTokenService.java +++ b/metadata-service/auth-impl/src/main/java/com/datahub/authentication/token/StatefulTokenService.java @@ -161,7 +161,7 @@ public TokenClaims validateAccessToken(@Nonnull String accessToken) throws Token this.revokeAccessToken(hash(accessToken)); throw e; } catch (final ExecutionException e) { - throw new TokenException("Failed to validate DataHub token: Unable to load token information from store"); + throw new TokenException("Failed to validate DataHub token: Unable to load token information from store", e); } } @@ -174,7 +174,7 @@ public void revokeAccessToken(@Nonnull String hashedToken) throws TokenException return; } } catch (ExecutionException e) { - throw new TokenException("Failed to validate DataHub token from cache"); + throw new TokenException("Failed to validate DataHub token from cache", e); } throw new TokenException("Access token no longer exists"); }