lib/intercom/request.rb in intercom-3.5.12 vs lib/intercom/request.rb in intercom-3.5.14
- old
+ new
@@ -113,9 +113,11 @@
raise Intercom::ResourceNotFound.new('Resource Not Found')
elsif res.code.to_i.eql?(401)
raise Intercom::AuthenticationError.new('Unauthorized')
elsif res.code.to_i.eql?(403)
raise Intercom::AuthenticationError.new('Forbidden')
+ elsif res.code.to_i.eql?(429)
+ raise Intercom::RateLimitExceeded.new('Rate Limit Exceeded')
elsif res.code.to_i.eql?(500)
raise Intercom::ServerError.new('Server Error')
elsif res.code.to_i.eql?(502)
raise Intercom::BadGatewayError.new('Bad Gateway Error')
elsif res.code.to_i.eql?(503)