Exception: FrOData::RequestError
- Defined in:
- lib/frodata/errors.rb
Overview
Base class for network errors
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #default_message ⇒ Object
- #http_status ⇒ Object
-
#initialize(response, message = nil) ⇒ RequestError
constructor
A new instance of RequestError.
- #message ⇒ Object
Constructor Details
#initialize(response, message = nil) ⇒ RequestError
Returns a new instance of RequestError.
10 11 12 13 14 |
# File 'lib/frodata/errors.rb', line 10 def initialize(response, = nil) super() @message = @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
8 9 10 |
# File 'lib/frodata/errors.rb', line 8 def response @response end |
Instance Method Details
#default_message ⇒ Object
24 25 26 |
# File 'lib/frodata/errors.rb', line 24 def nil end |
#http_status ⇒ Object
16 17 18 |
# File 'lib/frodata/errors.rb', line 16 def http_status response.status end |
#message ⇒ Object
20 21 22 |
# File 'lib/frodata/errors.rb', line 20 def [, @message].compact.join(': ') end |