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.



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

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