Exception: Transloadit::Exception::RateLimitReached

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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.

Returns:



17
18
19
# File 'lib/transloadit/exception.rb', line 17

def response
  @response
end