Exception: Down::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/down/errors.rb

Overview

raised when response returned 4xx or 5xx response

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response = nil) ⇒ ResponseError

Returns a new instance of ResponseError.



23
24
25
26
# File 'lib/down/errors.rb', line 23

def initialize(message, response = nil)
  super(message)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



21
22
23
# File 'lib/down/errors.rb', line 21

def response
  @response
end