修改异常提示语

This commit is contained in:
liaozetao
2023-07-17 14:16:21 +08:00
parent 07ff46f29a
commit 6cd2ce62a1
2 changed files with 3 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package com.accompany.oauth2.support.h5;
import cn.hutool.core.util.StrUtil;
import com.accompany.common.device.DeviceInfo;
import com.accompany.common.exception.ApiException;
import com.accompany.common.utils.DESUtils;
import com.accompany.core.util.KeyStore;
import com.accompany.core.util.MD5;
@@ -61,7 +62,7 @@ public class PasswordH5TokenGranter extends AbstractH5TokenGranter {
userDetailsService.login(username, userDetails, LoginTypeEnum.PASSWORD, deviceInfo, code);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RuntimeException(e.getMessage());
throw new ApiException(e.getMessage());
}
return accountH5LoginService.createH5AccessToken(((AccountDetails) userDetails).getAccount().getUid());
}

View File

@@ -62,7 +62,7 @@ public class VerifyCodeH5TokenGranter extends AbstractH5TokenGranter {
throw e;
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RuntimeException(e.getMessage());
throw new ApiException(e.getMessage());
}
return accountH5LoginService.createH5AccessToken(((AccountDetails) userDetails).getAccount().getUid());
}