Skip to content

Commit

Permalink
Merge pull request #26 from luismeyer95/fix-error-logs
Browse files Browse the repository at this point in the history
Fix #19: false positive error logs from HTTP 100 response
  • Loading branch information
jcdickinson committed Mar 1, 2023
2 parents bba80fb + 206e3d9 commit 7d62e9d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions lua/codeium/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,6 @@ function Server:new()
log.debug("completion request cancelled at the server", json.message)
return callback(false, nil)
end
if err.status == 100 and json.code then
log.debug("completion request failed", json)
return callback(false, nil)
end
end

notify.error("completion request failed", err)
Expand Down
2 changes: 1 addition & 1 deletion lua/codeium/io.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function M.post(url, params)
code = out.exit,
err = "curl failed",
})
elseif out.status < 200 or out.status > 299 then
elseif out.status > 299 then
cb(out.body, {
code = 0,
status = out.status,
Expand Down

0 comments on commit 7d62e9d

Please sign in to comment.