Exception: BrightData::HTTPError
- Defined in:
- lib/brightdata/errors.rb
Overview
Base class for transport-level errors.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ String?
readonly
Raw response body.
-
#response ⇒ Net::HTTPResponse?
readonly
Raw Net::HTTP response.
-
#status ⇒ Integer?
readonly
HTTP status, or nil if the request never completed.
Instance Method Summary collapse
-
#initialize(message, status: nil, body: nil, response: nil) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(message, status: nil, body: nil, response: nil) ⇒ HTTPError
Returns a new instance of HTTPError.
35 36 37 38 39 40 |
# File 'lib/brightdata/errors.rb', line 35 def initialize(, status: nil, body: nil, response: nil) super() @status = status @body = body @response = response end |
Instance Attribute Details
#body ⇒ String? (readonly)
Returns raw response body.
26 27 28 |
# File 'lib/brightdata/errors.rb', line 26 def body @body end |
#response ⇒ Net::HTTPResponse? (readonly)
Returns raw Net::HTTP response.
29 30 31 |
# File 'lib/brightdata/errors.rb', line 29 def response @response end |
#status ⇒ Integer? (readonly)
Returns HTTP status, or nil if the request never completed.
23 24 25 |
# File 'lib/brightdata/errors.rb', line 23 def status @status end |