Exception: HTTP::StatusError

Inherits:
ResponseError show all
Defined in:
lib/http/errors.rb

Overview

When status code indicates an error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ StatusError

Returns a new instance of StatusError.



28
29
30
31
32
# File 'lib/http/errors.rb', line 28

def initialize(response)
  @response = response

  super("Unexpected status code #{response.code}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



26
27
28
# File 'lib/http/errors.rb', line 26

def response
  @response
end