Skip to content

Commit

Permalink
revert: removed error logging from curl
Browse files Browse the repository at this point in the history
  • Loading branch information
udayvir-singh authored and NTBBloodbath committed Aug 9, 2022
1 parent e0ec373 commit 877291e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
6 changes: 4 additions & 2 deletions lua/rest-nvim/curl/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local utils = require("rest-nvim.utils")
local curl = require("plenary.curl")
local utils = require("rest-nvim.utils")
local curl = require("plenary.curl")
local log = require("plenary.log").new({ plugin = "rest.nvim", level = "debug" })
local config = require("rest-nvim.config")

local M = {}
Expand Down Expand Up @@ -53,6 +54,7 @@ end
local function create_callback(method, url)
return function(res)
if res.exit ~= 0 then
log.error("[rest.nvim] " .. utils.curl_error(res.exit))
return
end
local res_bufnr = M.get_or_create_buf()
Expand Down
9 changes: 5 additions & 4 deletions lua/rest-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
local rest = {}
local request = require("rest-nvim.request")
local config = require("rest-nvim.config")
local curl = require("rest-nvim.curl")
local Opts = {}
local config = require("rest-nvim.config")
local curl = require("rest-nvim.curl")

local rest = {}
local Opts = {}
local LastOpts = {}

rest.setup = function(user_configs)
Expand Down
6 changes: 3 additions & 3 deletions lua/rest-nvim/request/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local utils = require("rest-nvim.utils")
local path = require("plenary.path")
local log = require("plenary.log").new({ plugin = "rest.nvim", level = "debug" })
local utils = require("rest-nvim.utils")
local path = require("plenary.path")
local log = require("plenary.log").new({ plugin = "rest.nvim", level = "debug" })
local config = require("rest-nvim.config")

-- get_importfile returns in case of an imported file the absolute filename
Expand Down

0 comments on commit 877291e

Please sign in to comment.