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.



86
87
88
89
# File 'lib/render/errors.rb', line 86

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

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



84
85
86
# File 'lib/render/errors.rb', line 84

def endpoint
  @endpoint
end

#responseObject

Returns the value of attribute response.



84
85
86
# File 'lib/render/errors.rb', line 84

def response
  @response
end

Instance Method Details

#to_sObject



91
92
93
# File 'lib/render/errors.rb', line 91

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