Exception: OpenReceive::Server::RateLimitedError
- Inherits:
-
StandardError
- Object
- StandardError
- OpenReceive::Server::RateLimitedError
- Defined in:
- lib/openreceive/server/errors.rb
Overview
429 — the payer exceeded the configured invoice-creation budget. Mirrors
the JS handler: RATE_LIMITED with retryable: true so clients back off
and retry instead of treating it as a permanent failure, plus a
Retry-After hint (seconds) emitted as a response header.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#retry_after_seconds ⇒ Object
readonly
Returns the value of attribute retry_after_seconds.
-
#retryable ⇒ Object
readonly
Returns the value of attribute retryable.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = "Too many requests.") ⇒ RateLimitedError
constructor
A new instance of RateLimitedError.
Constructor Details
#initialize(message = "Too many requests.") ⇒ RateLimitedError
Returns a new instance of RateLimitedError.
144 145 146 147 148 149 150 |
# File 'lib/openreceive/server/errors.rb', line 144 def initialize( = "Too many requests.") super() @status = 429 @code = "RATE_LIMITED" @retryable = true @retry_after_seconds = 60 end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
142 143 144 |
# File 'lib/openreceive/server/errors.rb', line 142 def code @code end |
#retry_after_seconds ⇒ Object (readonly)
Returns the value of attribute retry_after_seconds.
142 143 144 |
# File 'lib/openreceive/server/errors.rb', line 142 def retry_after_seconds @retry_after_seconds end |
#retryable ⇒ Object (readonly)
Returns the value of attribute retryable.
142 143 144 |
# File 'lib/openreceive/server/errors.rb', line 142 def retryable @retryable end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
142 143 144 |
# File 'lib/openreceive/server/errors.rb', line 142 def status @status end |