Exception: AgentHarness::RateLimitError

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

Overview

Rate limiting and circuit breaker errors

Instance Attribute Summary collapse

Attributes inherited from Error

#context, #original_error

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, reset_time: nil, provider: nil, error_category: :rate_limited, **kwargs) ⇒ RateLimitError

Returns a new instance of RateLimitError.



52
53
54
55
56
57
# File 'lib/agent_harness/errors.rb', line 52

def initialize(message = nil, reset_time: nil, provider: nil, error_category: :rate_limited, **kwargs)
  @reset_time = reset_time
  @provider = provider
  @error_category = error_category
  super(message, **kwargs)
end

Instance Attribute Details

#error_category ⇒ Object (readonly)

Returns the value of attribute error_category.



50
51
52
# File 'lib/agent_harness/errors.rb', line 50

def error_category
  @error_category
end

#provider ⇒ Object (readonly)

Returns the value of attribute provider.



50
51
52
# File 'lib/agent_harness/errors.rb', line 50

def provider
  @provider
end

#reset_time ⇒ Object (readonly)

Returns the value of attribute reset_time.



50
51
52
# File 'lib/agent_harness/errors.rb', line 50

def reset_time
  @reset_time
end