Exception: MCPClient::Errors::InsufficientScopeError
- Inherits:
-
ConnectionError
- Object
- StandardError
- MCPError
- ConnectionError
- MCPClient::Errors::InsufficientScopeError
- Defined in:
- lib/mcp_client/errors.rb
Overview
Raised for an HTTP 403 with a WWW-Authenticate insufficient_scope challenge (MCP 2025-11-25 / SEP-835). Exposes the challenge parameters so hosts can run a step-up authorization flow with the required scopes.
Instance Attribute Summary collapse
-
#error_description ⇒ String?
readonly
The challenge's human-readable error description.
-
#scope ⇒ String?
readonly
The scopes required by the server's challenge.
Instance Method Summary collapse
-
#initialize(message, scope: nil, error_description: nil) ⇒ InsufficientScopeError
constructor
A new instance of InsufficientScopeError.
Constructor Details
#initialize(message, scope: nil, error_description: nil) ⇒ InsufficientScopeError
Returns a new instance of InsufficientScopeError.
50 51 52 53 54 |
# File 'lib/mcp_client/errors.rb', line 50 def initialize(, scope: nil, error_description: nil) super() @scope = scope @error_description = error_description end |
Instance Attribute Details
#error_description ⇒ String? (readonly)
Returns the challenge's human-readable error description.
45 46 47 |
# File 'lib/mcp_client/errors.rb', line 45 def error_description @error_description end |
#scope ⇒ String? (readonly)
Returns the scopes required by the server's challenge.
43 44 45 |
# File 'lib/mcp_client/errors.rb', line 43 def scope @scope end |