diff --git a/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java b/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java index 5c59c94b..a9c4dbff 100644 --- a/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java +++ b/components/org.wso2.carbon.identity.auth.service/src/main/java/org/wso2/carbon/identity/auth/service/handler/impl/OAuth2AccessTokenHandler.java @@ -173,8 +173,10 @@ protected AuthenticationResult doAuthenticate(MessageContext messageContext) { OAuth2Util.getServiceProvider(oAuth2IntrospectionResponseDTO.getClientId()). getApplicationName(); } catch (IdentityOAuth2Exception e) { - log.error("Error occurred while getting the Service Provider by Consumer key: " - + oAuth2IntrospectionResponseDTO.getClientId(), e); + if (log.isDebugEnabled()) { + log.debug("Error occurred while getting the Service Provider by Consumer key: " + + oAuth2IntrospectionResponseDTO.getClientId(), e); + } } String serviceProviderTenantDomain = null; @@ -182,8 +184,10 @@ protected AuthenticationResult doAuthenticate(MessageContext messageContext) { serviceProviderTenantDomain = OAuth2Util.getTenantDomainOfOauthApp(oAuth2IntrospectionResponseDTO.getClientId()); } catch (InvalidOAuthClientException | IdentityOAuth2Exception e) { - log.error("Error occurred while getting the OAuth App tenantDomain by Consumer key: " - + oAuth2IntrospectionResponseDTO.getClientId(), e); + if (log.isDebugEnabled()) { + log.debug("Error occurred while getting the OAuth App tenantDomain by Consumer key: " + + oAuth2IntrospectionResponseDTO.getClientId(), e); + } } if (serviceProvider != null) {