Browse Source

Merge pull request #2866 from volodymyr-babak/fix-for-error-msg

Updated to more generic error message in case of error
pull/2879/head
Andrew Shvayka 6 years ago
committed by GitHub
parent
commit
202547bf98
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      application/src/main/java/org/thingsboard/server/service/security/auth/oauth2/CustomOAuth2ClientMapper.java

4
application/src/main/java/org/thingsboard/server/service/security/auth/oauth2/CustomOAuth2ClientMapper.java

@ -56,8 +56,8 @@ public class CustomOAuth2ClientMapper extends AbstractOAuth2ClientMapper impleme
try { try {
return restTemplate.postForEntity(custom.getUrl(), request, OAuth2User.class).getBody(); return restTemplate.postForEntity(custom.getUrl(), request, OAuth2User.class).getBody();
} catch (Exception e) { } catch (Exception e) {
log.error("Can't connect to custom mapper endpoint", e); log.error("There was an error during connection to custom mapper endpoint", e);
throw new RuntimeException("Can't connect to custom mapper endpoint", e); throw new RuntimeException("Unable to login. Please contact your Administrator!");
} }
} }
} }

Loading…
Cancel
Save