Exception: Transloadit::Exception::RateLimitReached
- Inherits:
-
StandardError
- Object
- StandardError
- Transloadit::Exception::RateLimitReached
- Defined in:
- lib/transloadit/exception.rb
Overview
Exception raised when Rate limit error response is returned from the API. See Rate Limiting
Instance Attribute Summary collapse
-
#response ⇒ Transloadit::Response
readonly
The API response that reported the rate limit.
Instance Method Summary collapse
-
#initialize(response) ⇒ RateLimitReached
constructor
A new instance of RateLimitReached.
Constructor Details
#initialize(response) ⇒ RateLimitReached
Returns a new instance of RateLimitReached.
19 20 21 22 |
# File 'lib/transloadit/exception.rb', line 19 def initialize(response) @response = response super("Transloadit Rate Limit Reached. Retry in #{response.wait_time} seconds") end |
Instance Attribute Details
#response ⇒ Transloadit::Response (readonly)
Returns the API response that reported the rate limit.
17 18 19 |
# File 'lib/transloadit/exception.rb', line 17 def response @response end |