Class: PagerDuty::Connection::RaiseRateLimitOn429
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- PagerDuty::Connection::RaiseRateLimitOn429
- Defined in:
- lib/pager_duty/connection.rb
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'lib/pager_duty/connection.rb', line 53 def call(env) response = @app.call env if response.status == 429 raise RateLimitError, response.env[:url].to_s end response end |