Exception: Sumologic::RateLimitError

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

Overview

Rate limit errors (429 responses) Includes retry_after when available from X-RateLimit-Reset or Retry-After headers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, retry_after: nil, limit: nil, remaining: nil, reset_at: nil) ⇒ RateLimitError

Returns a new instance of RateLimitError.



20
21
22
23
24
25
26
# File 'lib/sumologic.rb', line 20

def initialize(message, retry_after: nil, limit: nil, remaining: nil, reset_at: nil)
  super(message)
  @retry_after = retry_after
  @limit = limit
  @remaining = remaining
  @reset_at = reset_at
end

Instance Attribute Details

#limitObject (readonly)

Returns the value of attribute limit.



18
19
20
# File 'lib/sumologic.rb', line 18

def limit
  @limit
end

#remainingObject (readonly)

Returns the value of attribute remaining.



18
19
20
# File 'lib/sumologic.rb', line 18

def remaining
  @remaining
end

#reset_atObject (readonly)

Returns the value of attribute reset_at.



18
19
20
# File 'lib/sumologic.rb', line 18

def reset_at
  @reset_at
end

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



18
19
20
# File 'lib/sumologic.rb', line 18

def retry_after
  @retry_after
end