Exception: HookBridge::RateLimitError

Inherits:
Error
  • Object
show all
Defined in:
lib/hookbridge/errors.rb

Overview

Raised when rate limit is exceeded (429)

Instance Attribute Summary collapse

Attributes inherited from Error

#code, #request_id, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "Rate limit exceeded", retry_after: nil, **kwargs) ⇒ RateLimitError

Returns a new instance of RateLimitError.



41
42
43
44
# File 'lib/hookbridge/errors.rb', line 41

def initialize(message = "Rate limit exceeded", retry_after: nil, **kwargs)
  @retry_after = retry_after
  super(message, code: "RATE_LIMIT_EXCEEDED", status_code: 429, **kwargs)
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



39
40
41
# File 'lib/hookbridge/errors.rb', line 39

def retry_after
  @retry_after
end