refactor(js): 优化一言数据获取失败的错误日志- 在 catch 方法中,将原始的错误信息替换为更具可读性的自定义错误消息

- 新增"获取一言数据失败"的前缀,使错误类型更加清晰
This commit is contained in:
hehh
2025-07-16 15:39:55 +08:00
parent b5ae443e4e
commit 93574c189f

View File

@@ -35,7 +35,7 @@ $(document).ready(function () {
}).then(function (e) { }).then(function (e) {
$('#description').html(e.hitokoto + "<br/> -「<strong>" + e.from + "</strong>」") $('#description').html(e.hitokoto + "<br/> -「<strong>" + e.from + "</strong>」")
}).catch(function (err) { }).catch(function (err) {
console.error(err); console.error("获取一言数据失败", err);
}) })
/** /**