Exception: CloudflareClient::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cloudflare_client/middleware/response/raise_error.rb

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

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(message = nil, response = nil, method = nil, uri = nil, url = nil)
  super(message)
  @response = response
  @method = method
  @uri = uri
  @url = url
end

Instance Attribute Details

#methodObject (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

#responseObject (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

#uriObject (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

#urlObject (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