Exception: DiscordStore::RateLimitedError
- Defined in:
- lib/discord_store/errors.rb
Overview
429 — rate limited. Carries the server-supplied backoff so callers can obey it rather than guessing.
Instance Attribute Summary collapse
-
#global ⇒ Object
readonly
Returns the value of attribute global.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Attributes inherited from APIError
#code, #response_body, #status
Instance Method Summary collapse
-
#initialize(message, retry_after:, scope: nil, global: false, **kwargs) ⇒ RateLimitedError
constructor
A new instance of RateLimitedError.
Constructor Details
#initialize(message, retry_after:, scope: nil, global: false, **kwargs) ⇒ RateLimitedError
Returns a new instance of RateLimitedError.
61 62 63 64 65 66 |
# File 'lib/discord_store/errors.rb', line 61 def initialize(, retry_after:, scope: nil, global: false, **kwargs) @retry_after = retry_after @scope = scope @global = global super(, **kwargs) end |
Instance Attribute Details
#global ⇒ Object (readonly)
Returns the value of attribute global.
59 60 61 |
# File 'lib/discord_store/errors.rb', line 59 def global @global end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
59 60 61 |
# File 'lib/discord_store/errors.rb', line 59 def retry_after @retry_after end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
59 60 61 |
# File 'lib/discord_store/errors.rb', line 59 def scope @scope end |