lib/createsend/createsend.rb in createsend-6.1.0 vs lib/createsend/createsend.rb in createsend-6.1.1
- old
+ new
@@ -28,10 +28,12 @@
class BadRequest < CreateSendError; end
# Raised for HTTP response code of 401
class Unauthorized < CreateSendError; end
# Raised for HTTP response code of 404
class NotFound < ClientError; end
+ # Raised for HTTP response code of 429
+ class TooManyRequests < ClientError; end
# Raised for HTTP response code of 401, specifically when an OAuth token
# in invalid (Code: 120, Message: 'Invalid OAuth Token')
class InvalidOAuthToken < Unauthorized; end
# Raised for HTTP response code of 401, specifically when an OAuth token
@@ -277,9 +279,11 @@
else
raise Unauthorized.new data
end
when 404
raise NotFound.new
+ when 429
+ raise TooManyRequests.new
when 400...500
raise ClientError.new
when 500...600
raise ServerError.new
else
\ No newline at end of file