Class: Akasha::HttpError
- Inherits:
-
StorageError
- Object
- Akasha::HttpError
- Defined in:
- lib/akasha/exceptions.rb
Overview
Base class for HTTP errors.
Instance Attribute Summary collapse
-
#response_headers ⇒ Object
readonly
Returns the value of attribute response_headers.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(env) ⇒ HttpError
constructor
A new instance of HttpError.
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_headers ⇒ Object (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_code ⇒ Object (readonly)
Returns the value of attribute status_code.
50 51 52 |
# File 'lib/akasha/exceptions.rb', line 50 def status_code @status_code end |