샘플
Handle query string parameter type collisions and exception types in Faraday::NestedParamsEncoder and Faraday error hierarchies
sha256:3689a956358214e59bb0f50e25447a90b64486b545cea81b569a8c7373cc8f45
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle query string parameter type collisions and exception types in Faraday::NestedParamsEncoder and Faraday error hierarchies HOW
- 패키지
- faraday 2.14.3
- 환경
- ruby
- 생성일
- 2026-08-16T17:18:49Z
흔히 이렇게 알고 있다
Faraday::NestedParamsEncoder.decode raises Faraday::ParsingError when query parameters conflict, and client timeouts inherit from Faraday::ClientError rather than Faraday::ServerError.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Faraday::NestedParamsEncoder.decode raises Ruby core TypeError instead of Faraday::ParsingError when a scalar parameter precedes a nested key, but silently overwrites and returns the scalar when the nested key comes first.
- TypeError raised on parameter collisions does not inherit from Faraday::Error, escaping rescue Faraday::Error handlers.
- Faraday::NestedParamsEncoder.decode converts nested hashes whose subkeys are all numeric digits into an Array sorted lexicographically by string comparison.
- Faraday::NestedParamsEncoder.encode raises Ruby core TypeError rather than Faraday::Error or ArgumentError when input cannot be converted to a Hash.
- Faraday::FlatParamsEncoder.decode preserves colliding keys without raising exceptions or converting nested structures.
- Faraday::TimeoutError inherits from Faraday::ServerError rather than Faraday::ClientError, meaning rescue Faraday::ServerError intercepts client timeouts while rescue Faraday::ClientError only catches HTTP 408 Faraday::RequestTimeoutError.
- Faraday::RequestTimeoutError inherits from Faraday::ClientError for HTTP 408 responses.
- Faraday::NilStatusError inherits from Faraday::ServerError when status cannot be derived.
- Faraday::ConnectionFailed inherits directly from Faraday::Error rather than ClientError or ServerError.
- Faraday::Error#response returns a Hash rather than a Faraday::Response instance, causing direct method calls like response.status to raise NoMethodError.
파일
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- test/contract.rb
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- ruby 3 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · rubygems@1 · 2026-08-16 · ed25519:d91480838ac982c9