Exception: Ksef::RateLimitedError
- Defined in:
- lib/ksef/errors.rb
Overview
HTTP 429. Retryable, but only for idempotent requests (DESIGN.md §6.7).
Instance Attribute Summary collapse
-
#retry_after ⇒ Integer?
readonly
Seconds to wait, from the
Retry-Afterheader.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = nil, problem: nil, retry_after: nil) ⇒ RateLimitedError
constructor
A new instance of RateLimitedError.
Methods inherited from ApiError
#code, #details, #raw, #status, #trace_id
Constructor Details
#initialize(message = nil, problem: nil, retry_after: nil) ⇒ RateLimitedError
Returns a new instance of RateLimitedError.
77 78 79 80 |
# File 'lib/ksef/errors.rb', line 77 def initialize( = nil, problem: nil, retry_after: nil) @retry_after = retry_after super(, problem: problem) end |
Instance Attribute Details
#retry_after ⇒ Integer? (readonly)
Returns seconds to wait, from the Retry-After header.
Authoritative — the block period is dynamic and lengthens with repeat offences
(docs/REFERENCE.md §6). Never work around a 429 by rotating IPs.
75 76 77 |
# File 'lib/ksef/errors.rb', line 75 def retry_after @retry_after end |