샘플
Handle the asymmetric exception wrapping and phase distribution between Faraday timeout options and Faraday::Adapter::NetHttp
sha256:d2ab361b5a26aaca1485c8c63f2f849804f7725bbab6574a58d895abd1d2a4e1
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle the asymmetric exception wrapping and phase distribution between Faraday timeout options and Faraday::Adapter::NetHttp HOW
- 패키지
- faraday-net_http 3.4.4
- 환경
- ruby
- 생성일
- 2026-08-17T02:41:37Z
흔히 이렇게 알고 있다
Faraday::Adapter::NetHttp wraps all request timeout failures as Faraday::TimeoutError regardless of whether the connection open or response read phase timed out.
이 샘플의 작성자가 여기서 개발자나 모델이 기대할 법한 내용으로 적어둔 것이다. 아래 계약이 실제로 실행된 것이다.
컨트랙트
- Net::OpenTimeout raises Faraday::ConnectionFailed rather than Faraday::TimeoutError because NET_HTTP_EXCEPTIONS intercepts open timeouts before Timeout::Error rescue handlers run.
- Net::ReadTimeout and Net::WriteTimeout raise Faraday::TimeoutError wrapping the underlying Net::ProtocolError timeout exception.
- Setting a general request timeout distributes the duration to open_timeout, read_timeout, and write_timeout on Net::HTTP individually instead of enforcing a single total deadline.
- Specific timeout options override their respective phase on Net::HTTP while leaving other phases with the general timeout fallback.
- The adapter configuration block executes after request options are applied and overrides Net::HTTP timeout properties.
파일
- 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-17 · ed25519:d91480838ac982c9