Exception: HookSniff::RateLimitError

Inherits:
ApiError
  • Object
show all
Defined in:
lib/hooksniff/errors.rb

Overview

429 Rate Limited

Instance Attribute Summary collapse

Attributes inherited from ApiError

#code, #response_body, #response_headers

Instance Method Summary collapse

Methods inherited from ApiError

#message, #to_s

Constructor Details

#initialize(retry_after: nil, response_headers: {}, response_body: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



86
87
88
89
# File 'lib/hooksniff/errors.rb', line 86

def initialize(retry_after: nil, response_headers: {}, response_body: nil)
  super(code: 429, response_headers: response_headers, response_body: response_body)
  @retry_after = retry_after
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



84
85
86
# File 'lib/hooksniff/errors.rb', line 84

def retry_after
  @retry_after
end