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

Returns a new instance of RequestError.



59
60
61
62
# File 'lib/render/errors.rb', line 59

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

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



57
58
59
# File 'lib/render/errors.rb', line 57

def endpoint
  @endpoint
end

#responseObject

Returns the value of attribute response.



57
58
59
# File 'lib/render/errors.rb', line 57

def response
  @response
end

Instance Method Details

#to_sObject



64
65
66
# File 'lib/render/errors.rb', line 64

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