fix: handle bedrock exceptions (#1483)

This commit is contained in:
brook hong
2025-03-04 23:47:28 +08:00
committed by GitHub
parent ab63b52ffb
commit e1d2d825e2
2 changed files with 11 additions and 1 deletions

View File

@@ -357,7 +357,7 @@ function M._stream(opts)
end
-- If stream is not enabled, then handle the response here
if spec.body.stream == false and result.status == 200 then
if (spec.body.stream == nil or spec.body.stream == false) and result.status == 200 then
vim.schedule(function()
completed = true
parse_response_without_stream(result.body)