lib/strava/web/raise_response_error.rb in strava-ruby-client-1.1.0 vs lib/strava/web/raise_response_error.rb in strava-ruby-client-2.0.0
- old
+ new
@@ -10,9 +10,11 @@
when 404
raise Faraday::ResourceNotFound, response_values(env)
when 407
# mimic the behavior that we get with proxy requests with HTTPS
raise Faraday::ConnectionFailed, %(407 "Proxy Authentication Required ")
+ when 429
+ raise Strava::Errors::RatelimitError.new(env, 'Too Many Requests')
when CLIENT_ERROR_STATUSES
raise Strava::Errors::Fault, response_values(env)
end
end