Exception: SimpleHttpService::RateLimitExceeded

Inherits:
Error
  • Object
show all
Defined in:
lib/simple_http_service/rate_limiter.rb

Overview

Raised when a request would exceed the configured rate limit and the client is not configured to wait for a free slot.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, retry_after: nil) ⇒ RateLimitExceeded

Returns a new instance of RateLimitExceeded.



9
10
11
12
# File 'lib/simple_http_service/rate_limiter.rb', line 9

def initialize(msg, retry_after: nil)
  @retry_after = retry_after
  super(msg)
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



7
8
9
# File 'lib/simple_http_service/rate_limiter.rb', line 7

def retry_after
  @retry_after
end