Exception: AgentHarness::AuthorizationError

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

Overview

Raised when valid credentials do not grant access to the requested resource.

Instance Attribute Summary collapse

Attributes inherited from Error

#context, #original_error

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, provider: nil, error_category: :authorization, error_code: :permission_denied, **kwargs) ⇒ AuthorizationError

Returns a new instance of AuthorizationError.



85
86
87
88
89
90
# File 'lib/agent_harness/errors.rb', line 85

def initialize(message = nil, provider: nil, error_category: :authorization, error_code: :permission_denied, **kwargs)
  @provider = provider
  @error_category = error_category
  @error_code = error_code
  super(message, **kwargs)
end

Instance Attribute Details

#error_category ⇒ Object (readonly)

Returns the value of attribute error_category.



83
84
85
# File 'lib/agent_harness/errors.rb', line 83

def error_category
  @error_category
end

#error_code ⇒ Object (readonly)

Returns the value of attribute error_code.



83
84
85
# File 'lib/agent_harness/errors.rb', line 83

def error_code
  @error_code
end

#provider ⇒ Object (readonly)

Returns the value of attribute provider.



83
84
85
# File 'lib/agent_harness/errors.rb', line 83

def provider
  @provider
end