修改了接口服务连接失败程序退出的问题

This commit is contained in:
Tian jianyong 2025-10-17 11:00:50 +08:00
parent a47fc1ee34
commit 1ecb424462
2 changed files with 4 additions and 4 deletions

View File

@ -101,12 +101,11 @@ public class AdxpFlightServiceHttpClient implements org.springframework.beans.fa
log.info("已登录 ADXP 适配器服务: sessionId={}", sessionId);
} else {
String message = body != null ? (String) body.get("message") : "Unknown error";
throw new IllegalStateException("登录失败: " + message);
log.warn("登录 ADXP 适配器服务失败: {}", message);
}
} catch (Exception e) {
log.error("登录 ADXP 适配器服务失败", e);
throw new RuntimeException("登录失败: " + e.getMessage(), e);
log.warn("登录 ADXP 适配器服务失败,适配器服务将暂时不可用", e);
} finally {
sessionLock.unlock();
}

View File

@ -70,7 +70,8 @@ public class AuthService {
} catch (Exception e) {
log.error("Failed to login: ", e);
}
throw new RuntimeException("Failed to obtain token");
log.warn("Failed to obtain token, will retry later");
return null;
}
//Token续时