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.
45 46 47 48 |
# File 'lib/clacky/server/channel/adapters/weixin/api_client.rb', line 45 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.
44 45 46 |
# File 'lib/clacky/server/channel/adapters/weixin/api_client.rb', line 44 def code @code end |