Exception: Render::Errors::Schema::RequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/render/errors.rb

Direct Known Subclasses

InvalidResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint, response) ⇒ RequestError



47
48
49
50
# File 'lib/render/errors.rb', line 47

def initialize(endpoint, response)
  self.endpoint = endpoint
  self.response = response
end

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



45
46
47
# File 'lib/render/errors.rb', line 45

def endpoint
  @endpoint
end

#responseObject

Returns the value of attribute response.



45
46
47
# File 'lib/render/errors.rb', line 45

def response
  @response
end

Instance Method Details

#to_sObject



52
53
54
# File 'lib/render/errors.rb', line 52

def to_s
  "Could not reach #{endpoint} because #{response}."
end