Exception: VectorMCP::ServerError
- Inherits:
-
ProtocolError
- Object
- StandardError
- Error
- ProtocolError
- VectorMCP::ServerError
- Defined in:
- lib/vector_mcp/errors.rb
Overview
Represents a JSON-RPC server-defined error (codes -32000 to -32099).
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ProtocolError
#code, #details, #message, #request_id
Instance Method Summary collapse
-
#initialize(message = "Server error", code: -32_000,, details: nil, request_id: nil) ⇒ ServerError
constructor
A new instance of ServerError.
Constructor Details
#initialize(message = "Server error", code: -32_000,, details: nil, request_id: nil) ⇒ ServerError
Returns a new instance of ServerError.
106 107 108 109 110 111 112 113 |
# File 'lib/vector_mcp/errors.rb', line 106 def initialize( = "Server error", code: -32_000, details: nil, request_id: nil) VectorMCP.logger.debug("Initializing ServerError with code: #{code}") unless (-32_099..-32_000).cover?(code) warn "Server error code #{code} is outside of the reserved range (-32099 to -32000). Using -32000 instead." code = -32_000 end super end |