Exception: ScreenshotFreeAPI::RateLimitError
- Inherits:
-
ScreenshotFreeAPIError
- Object
- StandardError
- ScreenshotFreeAPIError
- ScreenshotFreeAPI::RateLimitError
- Defined in:
- lib/screenshotfreeapi/errors.rb
Overview
429 — Per-minute rate limit exceeded. Includes ‘retry_after` seconds.
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from ScreenshotFreeAPIError
#details, #error_code, #status_code
Instance Method Summary collapse
-
#initialize(retry_after = nil, msg = "Rate limit exceeded") ⇒ RateLimitError
constructor
A new instance of RateLimitError.
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_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
53 54 55 |
# File 'lib/screenshotfreeapi/errors.rb', line 53 def retry_after @retry_after end |