diff --git a/lua/octo/commands.lua b/lua/octo/commands.lua index 69855128..529fca51 100644 --- a/lua/octo/commands.lua +++ b/lua/octo/commands.lua @@ -434,10 +434,15 @@ function M.octo(object, action, ...) end local a = o[action] or o - if not pcall(a, ...) then + if not a then utils.error(action and "Incorrect action: " .. action or "No action specified") return end + res = pcall(a, ...) + if not res then + utils.error(action and "Failed action: " .. action) + return + end end end