feat: 获取登陆信息错误不抛出异常
This commit is contained in:
parent
bc6bc66f20
commit
3faa3b4f98
@ -75,13 +75,14 @@ public class AxContextInterceptor implements HandlerInterceptor {
|
||||
}
|
||||
if (authorization.startsWith("Bearer")) {
|
||||
String result;
|
||||
String url = StringUtils.firstNonBlank(supplierHost, ENV_HOSTS.get(appRuntime.getEnv()));
|
||||
try {
|
||||
String url = StringUtils.firstNonBlank(supplierHost, ENV_HOSTS.get(appRuntime.getEnv()));
|
||||
result = HTTP_CLIENT.get(url, RequestParams.FormParams.builder()
|
||||
.headers(ImmutableMap.of("Authorization", authorization))
|
||||
.build());
|
||||
} catch (Exception ex) {
|
||||
throw ResultCode.RUNTIME_EXCEPTION.toException("获取登陆信息错误" + ex.getMessage());
|
||||
log.error("获取登陆信息错误, url = {}, authorization = {}", url, authorization, ex);
|
||||
return false;
|
||||
}
|
||||
//这里是一个非标准返回
|
||||
JSONObject resultJSON = JSONObject.parseObject(result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user