From 2c01000127adc08a05dd8955522e4071352f182f Mon Sep 17 00:00:00 2001 From: Nils Gerstner Date: Tue, 28 Mar 2023 08:00:18 +0200 Subject: [PATCH] Do not proceed when meilisearch note index returns 404 status --- .config/nvim/lua/note-workflow/delete.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/lua/note-workflow/delete.lua b/.config/nvim/lua/note-workflow/delete.lua index 3e44b15..823574a 100644 --- a/.config/nvim/lua/note-workflow/delete.lua +++ b/.config/nvim/lua/note-workflow/delete.lua @@ -23,7 +23,7 @@ function M.prune_search_db() accept = "application/json", }) - if res then + if res.status ~= 404 then local tab = json.parse(res.body) if tab and tab['total'] > 0 then for i, v in ipairs(tab['results']) do