Exception: ScreenshotFreeAPI::RateLimitError

Inherits:
ScreenshotFreeAPIError show all
Defined in:
lib/screenshotfreeapi/errors.rb

Overview

429 — Per-minute rate limit exceeded. Includes ‘retry_after` seconds.

Instance Attribute Summary collapse

Attributes inherited from ScreenshotFreeAPIError

#details, #error_code, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(retry_after = nil, msg = "Rate limit exceeded") ⇒ RateLimitError

Returns a new instance of RateLimitError.



55
56
57
58
# File 'lib/screenshotfreeapi/errors.rb', line 55

def initialize(retry_after = nil, msg = "Rate limit exceeded")
  super(429, "RateLimitExceeded", msg)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



53
54
55
# File 'lib/screenshotfreeapi/errors.rb', line 53

def retry_after
  @retry_after
end