Exception: Cloudflare::HTTPError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cloudflare_workers/http.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, url: nil, method: nil) ⇒ HTTPError

Returns a new instance of HTTPError.



23
24
25
26
27
# File 'lib/cloudflare_workers/http.rb', line 23

def initialize(message, url: nil, method: nil)
  @url = url
  @method = method
  super("[Cloudflare::HTTP] #{method || 'GET'} #{url}: #{message}")
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



22
23
24
# File 'lib/cloudflare_workers/http.rb', line 22

def method
  @method
end

#urlObject (readonly)

Returns the value of attribute url.



22
23
24
# File 'lib/cloudflare_workers/http.rb', line 22

def url
  @url
end