Exception: Parse::Agent::Unauthorized
- Inherits:
-
AgentError
- Object
- StandardError
- AgentError
- Parse::Agent::Unauthorized
- Defined in:
- lib/parse/agent/errors.rb
Overview
Authentication failure for MCP transport adapters. Custom auth blocks passed to Parse::Agent::MCPRackApp should raise this (or a subclass) to signal an unauthenticated/unauthorized request; the transport layer catches it and renders a sanitized 401 response.
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(message = "Unauthorized", reason: nil) ⇒ Unauthorized
constructor
A new instance of Unauthorized.
Constructor Details
#initialize(message = "Unauthorized", reason: nil) ⇒ Unauthorized
Returns a new instance of Unauthorized.
99 100 101 102 |
# File 'lib/parse/agent/errors.rb', line 99 def initialize( = "Unauthorized", reason: nil) @reason = reason super() end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
97 98 99 |
# File 'lib/parse/agent/errors.rb', line 97 def reason @reason end |