From 7413d5a5084bc2ff74933eda776bb045514ce811 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 25 Nov 2024 04:26:23 -0800 Subject: [PATCH] fix: avoid ignorable error in ubuntu 22.04+ (#903) --- lua/avante/selection.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/avante/selection.lua b/lua/avante/selection.lua index 342235c74..6930d775a 100644 --- a/lua/avante/selection.lua +++ b/lua/avante/selection.lua @@ -184,6 +184,8 @@ function Selection:create_editing_input() ---@type AvanteCompleteParser local on_complete = function(err) if err then + -- NOTE: in Ubuntu 22.04+ you will see this ignorable error from ~/.local/share/nvim/lazy/avante.nvim/lua/avante/llm.lua `on_error = function(err)`, check to avoid showing this error. + if type(err) == "table" and err.exit == nil and err.stderr == "{}" then return end Utils.error( "Error occurred while processing the response: " .. vim.inspect(err), { once = true, title = "Avante" }