Update error handle

This commit is contained in:
2024-02-22 11:44:30 +08:00
parent 75ca4181f8
commit 07daa9f1bf

View File

@@ -1,7 +1,7 @@
// ==UserScript==
// @name NGA优化摸鱼体验插件-自动同步数据
// @namespace https://github.com/lifegpc/userscript/tree/master/NGA_BBS_plugins/AutoSyncData
// @version 1.0.1
// @version 1.0.2
// @author lifegpc
// @description 通过WebDAV自动同步数据
// @license MIT
@@ -310,6 +310,11 @@
}
this.mainScript.popMsg(`WebDAV请求失败! 状态码: ${response.status} ${response.statusText}`, 'err')
}
},
onerror: error => {
reject(error);
this.buttons.forEach(button => button.$el.removeAttr('disabled'))
this.mainScript.popMsg(`WebDAV请求失败!`, error);
}
})
})