Exception: XeroKiwi::Throttle::DailyLimitExhausted
- Defined in:
- lib/xero_kiwi/throttle.rb
Overview
Raised immediately (no sleep) when the per-day bucket is exhausted. The wait until reset is typically measured in hours, so blocking the caller is the wrong move — re-enqueue the job at ‘retry_after` instead. Shape mirrors RateLimitError so existing Xero rate-limit handling applies.
Instance Attribute Summary collapse
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Instance Method Summary collapse
-
#initialize(retry_after:) ⇒ DailyLimitExhausted
constructor
A new instance of DailyLimitExhausted.
Constructor Details
#initialize(retry_after:) ⇒ DailyLimitExhausted
Returns a new instance of DailyLimitExhausted.
25 26 27 28 |
# File 'lib/xero_kiwi/throttle.rb', line 25 def initialize(retry_after:) @retry_after = retry_after super("Xero daily rate limit exhausted; retry in #{retry_after.round}s") end |
Instance Attribute Details
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
23 24 25 |
# File 'lib/xero_kiwi/throttle.rb', line 23 def retry_after @retry_after end |