|
@ -555,10 +555,10 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
|
|
|
public ResponseEntity<Oauth2Envelop> handleException(Exception e) throws Exception {
|
|
|
LOG.debug(e.getMessage(), e);
|
|
|
if (e instanceof UsernameNotFoundException) {
|
|
|
return handleOAuth2Exception(new Oauth2Envelop("用户不存在!", ResultStatus.USER_NO_EXIST), e);
|
|
|
return handleOAuth2Exception(new Oauth2Envelop("用户不存在!", ResultStatus.INVALID_GRANT), e);
|
|
|
} else if (e instanceof NoSuchClientException) {
|
|
|
return handleOAuth2Exception(new Oauth2Envelop("应用未注册!", ResultStatus.APP_NO_EXIST), e);
|
|
|
} else if (e instanceof InvalidGrantException) {
|
|
|
return handleOAuth2Exception(new Oauth2Envelop("应用未注册!", ResultStatus.INVALID_GRANT), e);
|
|
|
} else if (e instanceof InvalidGrantException || e instanceof UsernameNotFoundException) {
|
|
|
return handleOAuth2Exception(new Oauth2Envelop(invalidGrantMessage((InvalidGrantException)e), ResultStatus.INVALID_GRANT), e);
|
|
|
} else if (e instanceof InvalidTokenException) {
|
|
|
return handleOAuth2Exception(new Oauth2Envelop("Token有误/过期!", ResultStatus.ERROR_TOKEN), e);
|