refactor(api): 优化获取节点失败的错误信息

- 在 inbound 请求失败时,将错误信息详细输出
- 有助于调试和排查问题
This commit is contained in:
2025-06-06 15:20:25 +08:00
parent d13b80611c
commit 319afb24ec

View File

@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
});
}
const inbound = await ins.get(`/panel/api/inbounds/get/${id}`);
if (!inbound?.success) return (ctx.body = { code: "1", msg: "获取节点失败" });
if (!inbound?.success) return (ctx.body = { code: "1", msg: `获取节点失败:${inbound}` });
uuid = uuid || randomUUID();
email = email || uuid.split("-")[0];
if (expiryTime != 0) {