Exception: AgentsID::PermissionDeniedError

Inherits:
AgentsIDError
  • Object
show all
Defined in:
lib/agentsid/errors.rb

Instance Attribute Summary collapse

Attributes inherited from AgentsIDError

#code, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(tool, reason) ⇒ PermissionDeniedError



23
24
25
26
27
28
29
30
31
# File 'lib/agentsid/errors.rb', line 23

def initialize(tool, reason)
  @tool = tool
  @reason = reason
  super(
    "Permission denied for tool \"#{tool}\": #{reason}",
    code: "PERMISSION_DENIED",
    status_code: 403
  )
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



21
22
23
# File 'lib/agentsid/errors.rb', line 21

def reason
  @reason
end

#toolObject (readonly)

Returns the value of attribute tool.



21
22
23
# File 'lib/agentsid/errors.rb', line 21

def tool
  @tool
end