diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0c41cec4..0f02ea1c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.38" + ".": "0.1.0-alpha.39" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ceb8bf2d..f2239ea6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 46 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f81c5824a9002c980fc0d66c4d52e6cbd8baf7678f5e0f2215909357cff6f82c.yml -openapi_spec_hash: 7714062cac3bb5597b8571172775bc92 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-d5c3e3934333478f55af69889eafaea9b0eeae82a1597c5dec34426e9d55efd5.yml +openapi_spec_hash: 9ec42fee7f3124b3050846f74404b398 config_hash: 0892e2e0eeb0343a022afa62e9080dd1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e5b3f7..335ad368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.39 (2025-12-19) + +Full Changelog: [v0.1.0-alpha.38...v0.1.0-alpha.39](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.38...v0.1.0-alpha.39) + +### Bug Fixes + +* issue where json.parse errors when receiving HTTP 204 with nobody ([129433c](https://github.com/Finch-API/finch-api-ruby/commit/129433cc4ce1ab1f1e3b3c169cf804742f07e95d)) + ## 0.1.0-alpha.38 (2025-12-17) Full Changelog: [v0.1.0-alpha.37...v0.1.0-alpha.38](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.37...v0.1.0-alpha.38) diff --git a/Gemfile.lock b/Gemfile.lock index 3070506a..b469006b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.38) + finch-api (0.1.0.pre.alpha.39) connection_pool GEM diff --git a/README.md b/README.md index 35b4e01c..eea6306a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "finch-api", "~> 0.1.0.pre.alpha.38" +gem "finch-api", "~> 0.1.0.pre.alpha.39" ``` diff --git a/lib/finch_api/internal/util.rb b/lib/finch_api/internal/util.rb index 4653e788..6c29c988 100644 --- a/lib/finch_api/internal/util.rb +++ b/lib/finch_api/internal/util.rb @@ -657,7 +657,8 @@ def force_charset!(content_type, text:) def decode_content(headers, stream:, suppress_error: false) case (content_type = headers["content-type"]) in FinchAPI::Internal::Util::JSON_CONTENT - json = stream.to_a.join + return nil if (json = stream.to_a.join).empty? + begin JSON.parse(json, symbolize_names: true) rescue JSON::ParserError => e @@ -667,7 +668,11 @@ def decode_content(headers, stream:, suppress_error: false) in FinchAPI::Internal::Util::JSONL_CONTENT lines = decode_lines(stream) chain_fused(lines) do |y| - lines.each { y << JSON.parse(_1, symbolize_names: true) } + lines.each do + next if _1.empty? + + y << JSON.parse(_1, symbolize_names: true) + end end in %r{^text/event-stream} lines = decode_lines(stream) diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index f642e39e..db14622f 100644 --- a/lib/finch_api/version.rb +++ b/lib/finch_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module FinchAPI - VERSION = "0.1.0.pre.alpha.38" + VERSION = "0.1.0.pre.alpha.39" end