Update error handle
This commit is contained in:
@@ -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);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user