Exception: Clacky::Channel::Adapters::Weixin::ApiClient::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Clacky::Channel::Adapters::Weixin::ApiClient::ApiError
- Defined in:
- lib/clacky/server/channel/adapters/weixin/api_client.rb
Overview
Raised for non-zero API return codes or HTTP errors.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, msg) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(code, msg) ⇒ ApiError
Returns a new instance of ApiError.
40 41 42 43 |
# File 'lib/clacky/server/channel/adapters/weixin/api_client.rb', line 40 def initialize(code, msg) @code = code super("WeixinApiError(#{code}): #{msg.to_s.slice(0, 200)}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
39 40 41 |
# File 'lib/clacky/server/channel/adapters/weixin/api_client.rb', line 39 def code @code end |