Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
==========================================
+ Coverage 99.40% 99.42% +0.02%
==========================================
Files 9 9
Lines 336 348 +12
Branches 38 41 +3
==========================================
+ Hits 334 346 +12
Misses 1 1
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTML proxy errors currently expose a parser exception when callers access a response body. Valid JSON is also reparsed on every access.
Memoize parsed bodies and invalidate them on response replacement. Wrap JSON parse failures in
Transloadit::Exception::InvalidResponse, exposing HTTP status, raw body, and parser cause while keeping the message free of response contents. Explicitly reject empty/whitespace bodies because some MultiJson adapters accept them as nil. Preserve valid array, null, and false bodies.Validation: full Ruby 3.3 suite passes (131 tests, 268 assertions; optional live-upload and signature-parity tests skipped), plus
bundle exec standardrbandgit diff --check. Tests cover single parsing, cache invalidation, HTML and empty responses, diagnostic access, parser causes, and existing non-object JSON behavior.Compatibility: constrain JSON to versions below 3 because Ruby 3.1 resolves MultiJson 1.19, whose positional parsing options are incompatible with JSON 3. This dependency constraint is shared across the four independent fixes.
The four fixes also merge together cleanly. Their combined Ruby 3.3 suite passes with Node signature parity enabled: 147 tests, 321 assertions, with only the optional live upload skipped.