Exception: Trigv::RateLimitError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, retryable: true, retry_after_seconds: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



49
50
51
52
53
54
# File 'lib/trigv/errors.rb', line 49

def initialize(message, retryable: true, retry_after_seconds: nil)
  super(message)
  @status_code = 429
  @retryable = retryable
  @retry_after_seconds = retry_after_seconds
end

Instance Attribute Details

#retry_after_secondsObject (readonly)

Returns the value of attribute retry_after_seconds.



47
48
49
# File 'lib/trigv/errors.rb', line 47

def retry_after_seconds
  @retry_after_seconds
end

#retryableObject (readonly)

Returns the value of attribute retryable.



47
48
49
# File 'lib/trigv/errors.rb', line 47

def retryable
  @retryable
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



47
48
49
# File 'lib/trigv/errors.rb', line 47

def status_code
  @status_code
end