Class: EmailFuse::Error::RateLimitExceededError
- Inherits:
-
ServerError
- Object
- EmailFuse::Error::RateLimitExceededError
- Defined in:
- lib/email_fuse/errors.rb
Overview
code 429
Instance Attribute Summary collapse
-
#rate_limit_limit ⇒ Object
readonly
Returns the value of attribute rate_limit_limit.
-
#rate_limit_remaining ⇒ Object
readonly
Returns the value of attribute rate_limit_remaining.
-
#rate_limit_reset ⇒ Object
readonly
Returns the value of attribute rate_limit_reset.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Instance Method Summary collapse
-
#initialize(msg, code = nil, headers = {}) ⇒ RateLimitExceededError
constructor
A new instance of RateLimitExceededError.
Constructor Details
#initialize(msg, code = nil, headers = {}) ⇒ RateLimitExceededError
Returns a new instance of RateLimitExceededError.
23 24 25 26 27 28 29 |
# File 'lib/email_fuse/errors.rb', line 23 def initialize(msg, code = nil, headers = {}) super(msg, code, headers) @rate_limit_limit = headers["ratelimit-limit"]&.to_i @rate_limit_remaining = headers["ratelimit-remaining"]&.to_i @rate_limit_reset = headers["ratelimit-reset"]&.to_i @retry_after = headers["retry-after"]&.to_i end |
Instance Attribute Details
#rate_limit_limit ⇒ Object (readonly)
Returns the value of attribute rate_limit_limit.
21 22 23 |
# File 'lib/email_fuse/errors.rb', line 21 def rate_limit_limit @rate_limit_limit end |
#rate_limit_remaining ⇒ Object (readonly)
Returns the value of attribute rate_limit_remaining.
21 22 23 |
# File 'lib/email_fuse/errors.rb', line 21 def rate_limit_remaining @rate_limit_remaining end |
#rate_limit_reset ⇒ Object (readonly)
Returns the value of attribute rate_limit_reset.
21 22 23 |
# File 'lib/email_fuse/errors.rb', line 21 def rate_limit_reset @rate_limit_reset end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
21 22 23 |
# File 'lib/email_fuse/errors.rb', line 21 def retry_after @retry_after end |