Exception: XeroKiwi::RateLimitError
- Defined in:
- lib/xero_kiwi/errors.rb
Instance Attribute Summary collapse
-
#problem ⇒ Object
readonly
Returns the value of attribute problem.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from APIError
Instance Method Summary collapse
-
#initialize(status, body, retry_after: nil, problem: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(status, body, retry_after: nil, problem: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
28 29 30 31 32 |
# File 'lib/xero_kiwi/errors.rb', line 28 def initialize(status, body, retry_after: nil, problem: nil) @retry_after = retry_after @problem = problem super(status, body, "Xero rate limit hit (#{problem || "unknown"}); retry after #{retry_after}s") end |
Instance Attribute Details
#problem ⇒ Object (readonly)
Returns the value of attribute problem.
26 27 28 |
# File 'lib/xero_kiwi/errors.rb', line 26 def problem @problem end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
26 27 28 |
# File 'lib/xero_kiwi/errors.rb', line 26 def retry_after @retry_after end |