Exception: LetMeSendEmail::RateLimitError
- Defined in:
- lib/letmesendemail/errors.rb
Overview
HTTP 429 failure with rate-limit metadata.
Instance Attribute Summary collapse
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
-
#reset_at ⇒ Object
readonly
Returns the value of attribute reset_at.
-
#retry_after ⇒ Object
readonly
Returns the value of attribute retry_after.
Attributes inherited from Error
#api_code, #raw_body, #request_id, #response_headers, #status_code, #validation_errors
Instance Method Summary collapse
-
#initialize(message = nil, status_code: nil, api_code: nil, validation_errors: nil, request_id: nil, response_headers: nil, raw_body: nil, retry_after: nil, limit: nil, remaining: nil, reset_at: nil) ⇒ RateLimitError
constructor
A new instance of RateLimitError.
Constructor Details
#initialize(message = nil, status_code: nil, api_code: nil, validation_errors: nil, request_id: nil, response_headers: nil, raw_body: nil, retry_after: nil, limit: nil, remaining: nil, reset_at: nil) ⇒ RateLimitError
Returns a new instance of RateLimitError.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/letmesendemail/errors.rb', line 34 def initialize( = nil, status_code: nil, api_code: nil, validation_errors: nil, request_id: nil, response_headers: nil, raw_body: nil, retry_after: nil, limit: nil, remaining: nil, reset_at: nil) super(, status_code: status_code, api_code: api_code, validation_errors: validation_errors, request_id: request_id, response_headers: response_headers, raw_body: raw_body) @retry_after = retry_after @limit = limit @remaining = remaining @reset_at = reset_at end |
Instance Attribute Details
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
32 33 34 |
# File 'lib/letmesendemail/errors.rb', line 32 def limit @limit end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
32 33 34 |
# File 'lib/letmesendemail/errors.rb', line 32 def remaining @remaining end |
#reset_at ⇒ Object (readonly)
Returns the value of attribute reset_at.
32 33 34 |
# File 'lib/letmesendemail/errors.rb', line 32 def reset_at @reset_at end |
#retry_after ⇒ Object (readonly)
Returns the value of attribute retry_after.
32 33 34 |
# File 'lib/letmesendemail/errors.rb', line 32 def retry_after @retry_after end |