Exception: Douban::BadRequest
- Defined in:
- lib/douban_api/error.rb
Overview
Raised when Douban returns the HTTP status code 400
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
Instance Method Summary collapse
-
#initialize(body) ⇒ BadRequest
constructor
A new instance of BadRequest.
Constructor Details
#initialize(body) ⇒ BadRequest
Returns a new instance of BadRequest.
10 11 12 13 |
# File 'lib/douban_api/error.rb', line 10 def initialize(body) @code, @msg = 0, "" parse_error_body(body) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/douban_api/error.rb', line 8 def code @code end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
8 9 10 |
# File 'lib/douban_api/error.rb', line 8 def msg @msg end |