Exception: CloudflareClient::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- CloudflareClient::ResponseError
- Defined in:
- lib/cloudflare_client/middleware/response/raise_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
The Faraday::Response object that caused the exception to be raised.
-
#response ⇒ Object
readonly
The Faraday::Response object that caused the exception to be raised.
-
#uri ⇒ Object
readonly
The Faraday::Response object that caused the exception to be raised.
-
#url ⇒ Object
readonly
The Faraday::Response object that caused the exception to be raised.
Instance Method Summary collapse
-
#initialize(message = nil, response = nil, method = nil, uri = nil, url = nil) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(message = nil, response = nil, method = nil, uri = nil, url = nil) ⇒ ResponseError
Returns a new instance of ResponseError.
6 7 8 9 10 11 12 |
# File 'lib/cloudflare_client/middleware/response/raise_error.rb', line 6 def initialize( = nil, response = nil, method = nil, uri = nil, url = nil) super("#{}, #{method&.upcase} #{url} #{response&.body}") @response = response @method = method @uri = uri @url = url end |
Instance Attribute Details
#method ⇒ Object (readonly)
The Faraday::Response object that caused the exception to be raised.
4 5 6 |
# File 'lib/cloudflare_client/middleware/response/raise_error.rb', line 4 def method @method end |
#response ⇒ Object (readonly)
The Faraday::Response object that caused the exception to be raised.
4 5 6 |
# File 'lib/cloudflare_client/middleware/response/raise_error.rb', line 4 def response @response end |
#uri ⇒ Object (readonly)
The Faraday::Response object that caused the exception to be raised.
4 5 6 |
# File 'lib/cloudflare_client/middleware/response/raise_error.rb', line 4 def uri @uri end |
#url ⇒ Object (readonly)
The Faraday::Response object that caused the exception to be raised.
4 5 6 |
# File 'lib/cloudflare_client/middleware/response/raise_error.rb', line 4 def url @url end |