Exception: Qiniu::RS::ResponseError
- Defined in:
- lib/qiniu/rs/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #http_body ⇒ Object
- #http_code ⇒ Object
-
#initialize(message, response = nil) ⇒ ResponseError
constructor
A new instance of ResponseError.
- #inspect ⇒ Object
Constructor Details
#initialize(message, response = nil) ⇒ ResponseError
Returns a new instance of ResponseError.
12 13 14 15 |
# File 'lib/qiniu/rs/exceptions.rb', line 12 def initialize(, response = nil) @response = response super() end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/qiniu/rs/exceptions.rb', line 10 def response @response end |
Instance Method Details
#http_body ⇒ Object
21 22 23 |
# File 'lib/qiniu/rs/exceptions.rb', line 21 def http_body @response.body if @response end |
#http_code ⇒ Object
17 18 19 |
# File 'lib/qiniu/rs/exceptions.rb', line 17 def http_code @response.code.to_i if @response end |
#inspect ⇒ Object
25 26 27 |
# File 'lib/qiniu/rs/exceptions.rb', line 25 def inspect "#{}: #{http_body}" end |