Exception: Dingding::Notifier::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Dingding::Notifier::APIError
- Defined in:
- lib/dingding-notifier/util/http_client.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
- #message ⇒ Object
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
13 14 15 |
# File 'lib/dingding-notifier/util/http_client.rb', line 13 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/dingding-notifier/util/http_client.rb', line 11 def response @response end |
Instance Method Details
#message ⇒ Object
17 18 19 20 21 22 |
# File 'lib/dingding-notifier/util/http_client.rb', line 17 def <<-MSG The slack API returned an error: #{@response.body} (HTTP Code #{@response.code}) Check the "Handling Errors" section on https://api.slack.com/incoming-webhooks for more information MSG end |