Exception: Clacky::Channel::Adapters::Weixin::ApiClient::ApiError

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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

#codeObject (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