lib/wechat/api/client.rb in wechat-api-0.4.2 vs lib/wechat/api/client.rb in wechat-api-0.4.3
- old
+ new
@@ -9,10 +9,11 @@
module Wechat
module Api
#
class ResponseError < StandardError; end
class AccessTokenExpiredError < ResponseError; end
+ class SubscribeError < ResponseError; end
#
class Client
include Message
include User
include Util
@@ -105,9 +106,11 @@
case response['errcode']
when 0, nil
response
when 40_001, 42_001, 40_014
raise AccessTokenExpiredError, response
+ when 43_004
+ raise SubscribeError, response
else
raise ResponseError, response
end
end