Class: Akasha::HttpError

Inherits:
StorageError
  • Object
show all
Defined in:
lib/akasha/exceptions.rb

Overview

Base class for HTTP errors.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ HttpError

Returns a new instance of HttpError.



52
53
54
55
56
# File 'lib/akasha/exceptions.rb', line 52

def initialize(env)
  @status_code = env.status.to_i
  @response_headers = env.response_headers
  super("Unexpected HTTP response: #{@status_code}")
end

Instance Attribute Details

#response_headersObject (readonly)

Returns the value of attribute response_headers.



50
51
52
# File 'lib/akasha/exceptions.rb', line 50

def response_headers
  @response_headers
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



50
51
52
# File 'lib/akasha/exceptions.rb', line 50

def status_code
  @status_code
end