Replace rest-client with Faraday - #77
Open
tim-kos wants to merge 3 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
- Coverage 99.02% 98.21% -0.82%
==========================================
Files 9 9
Lines 308 336 +28
Branches 44 38 -6
==========================================
+ Hits 305 330 +25
+ Misses 3 1 -2
- Partials 0 5 +5 ☔ 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.
Summary
rest-clientdependency with Faraday 2 andfaraday-multipartTransloadit::ResponseTransloadit::Exception::RequestFailedand retain the original transport failure as itscauseRateLimitReached#responsewhile making the exception SDK-ownedWhy
The latest
rest-clientgem release is from 2019, and prospective customers have identified it as a reason not to adopt the Ruby SDK. Faraday is actively maintained and is already familiar in the Rails ecosystem.This change also establishes an SDK-owned transport boundary. A future HTTP-client migration will no longer require changing response or exception types.
Compatibility
The documented SDK response behavior remains available:
response.bodyresponse.headersresponse.coderesponse.statusThis should ship in a major release because consumers may currently rely on undocumented RestClient delegation or rescue RestClient exception classes directly. See the migration guide for concrete before/after examples and an upgrade checklist.
Test coverage
The compatibility suite explicitly covers:
code/statuson non-2xx responsesoriginal_filenameandcontent_typeRequestFailedwith the originalcauseRestClientVerification