Class: XiWechatCorp::API::ClientError

Inherits:
Faraday::ClientError
  • Object
show all
Defined in:
lib/xi_wechat_corp/api/connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ClientError

Returns a new instance of ClientError.



10
11
12
13
14
# File 'lib/xi_wechat_corp/api/connection.rb', line 10

def initialize(response)
  @response = response
  message = response ? response.values_at('errcode', 'errmsg').compact.join(' ')  : nil
  super(message)
end