From aa0c6115638195b39eeca614cd28f7831c22dd0a Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Thu, 30 Nov 2023 14:49:12 -0500 Subject: Added in extra error handling. --- plugins/plugin_manager/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/plugin_manager/init.lua') diff --git a/plugins/plugin_manager/init.lua b/plugins/plugin_manager/init.lua index 2fde4e3..3f27f96 100644 --- a/plugins/plugin_manager/init.lua +++ b/plugins/plugin_manager/init.lua @@ -200,7 +200,7 @@ function PluginManager:get_addons(options) else self:refresh(options):done(function() prom:resolve(self.addons) - end) + end):fail(function(arg) promise:reject(arg) end) end return prom end @@ -232,7 +232,7 @@ function PluginManager:unstub(addon, options) local unstubbed_addon = json.decode(result).addons[1] for k,v in pairs(unstubbed_addon) do addon[k] = v end promise:resolve(addon) - end) + end):fail(function(arg) promise:reject(arg) end) end return promise end @@ -256,7 +256,7 @@ function PluginManager:get_addon(name_and_version, options) end end if not match then promise:reject() end - end) + end):fail(function(arg) promise:reject(arg) end) return promise end -- cgit v1.2.3