Exception: DingBot::Error::ResponseError
- Defined in:
- lib/dingbot/error.rb
Overview
Custom error class for rescuing from HTTP response errors.
Direct Known Subclasses
BadGateway, BadRequest, Conflict, Forbidden, InternalServerError, MethodNotAllowed, NotFound, ServiceUnavailable, Unauthorized, Unprocessable
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseError
constructor
A new instance of ResponseError.
-
#response_status ⇒ Integer
Status code returned in the http response.
Constructor Details
#initialize(response) ⇒ ResponseError
Returns a new instance of ResponseError.
17 18 19 20 |
# File 'lib/dingbot/error.rb', line 17 def initialize(response) @response = response super() end |
Instance Method Details
#response_status ⇒ Integer
Status code returned in the http response.
25 26 27 |
# File 'lib/dingbot/error.rb', line 25 def response_status @response.code end |