Exception: Portage::Ucp::ProxyError
- Defined in:
- lib/portage/ucp/errors.rb
Overview
Raised by Support::Connection (docs/plans/proxy-support.md Phase 1)
when any hop of a proxy connection fails — a plain-forward/gateway
dial that can't reach its proxy at all, or (most commonly) a
hand-rolled CONNECT tunnel hop answering anything but 200. Named by
1-indexed hop position (never 0-indexed — "hop 2" means the second
proxy a request passes through, matching how a human would describe a
chain) and the redacted proxy host (host:port, or
http://***@host:port when the profile carried credentials) — never
the real credentials, same posture as doctor's proxy_finding in
portage-cli. status is the CONNECT response's HTTP status when the
hop answered at all (e.g. 407 for "proxy authentication required"),
or nil when the hop never answered (DNS failure, connection refused).
Instance Attribute Summary collapse
-
#hop_index ⇒ Object
readonly
Returns the value of attribute hop_index.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(hop_index:, host:, status: nil, detail: nil) ⇒ ProxyError
constructor
A new instance of ProxyError.
Constructor Details
#initialize(hop_index:, host:, status: nil, detail: nil) ⇒ ProxyError
Returns a new instance of ProxyError.
106 107 108 109 110 |
# File 'lib/portage/ucp/errors.rb', line 106 def initialize(hop_index:, host:, status: nil, detail: nil) @hop_index = hop_index @status = status super((host, detail)) end |
Instance Attribute Details
#hop_index ⇒ Object (readonly)
Returns the value of attribute hop_index.
104 105 106 |
# File 'lib/portage/ucp/errors.rb', line 104 def hop_index @hop_index end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
104 105 106 |
# File 'lib/portage/ucp/errors.rb', line 104 def status @status end |