Exception: Chatrix::RateLimitError
- Inherits:
-
ApiError
- Object
- StandardError
- ChatrixError
- ApiError
- Chatrix::RateLimitError
- Defined in:
- lib/chatrix/errors.rb
Overview
Error raised when the API request limit is reached.
Instance Attribute Summary collapse
-
#retry_delay ⇒ Fixnum?
readonly
Number of milliseconds to wait before attempting this request again.
Attributes inherited from ApiError
Instance Method Summary collapse
-
#initialize(error = {}) ⇒ RateLimitError
constructor
Initializes a new RateLimitError instance.
Constructor Details
#initialize(error = {}) ⇒ RateLimitError
Initializes a new RateLimitError instance.
43 44 45 46 |
# File 'lib/chatrix/errors.rb', line 43 def initialize(error = {}) super @retry_delay = error['retry_after_ms'] if error.key? 'retry_after_ms' end |
Instance Attribute Details
#retry_delay ⇒ Fixnum? (readonly)
Returns number of milliseconds to wait before attempting
this request again. If no delay was provided this will be nil
.
39 40 41 |
# File 'lib/chatrix/errors.rb', line 39 def retry_delay @retry_delay end |