fix(updater): 为HTTP错误添加默认提示信息

当HTTP请求失败时,如果错误信息为空则显示"Unknown HTTP error",避免用户看到空提示
This commit is contained in:
2025-08-31 20:56:26 +08:00
parent 311b49a3e5
commit c9f9759da9

View File

@@ -79,7 +79,7 @@ local function dl(f)
until evt[1] == "http_success" or evt[1] == "http_failure"
if evt[1] == "http_failure" then
term.at(1, h).write(evt[3])
term.at(1, h).write(evt[3] or "Unknown HTTP error")
local id = os.startTimer(5)
repeat local _,i = coroutine.yield() until i == id