Exception: VectorMCP::ServerError

Inherits:
ProtocolError show all
Defined in:
lib/vector_mcp/errors.rb

Overview

Represents a JSON-RPC server-defined error (codes -32000 to -32099).

Direct Known Subclasses

InitializationError, RateLimitExceededError

Instance Attribute Summary

Attributes inherited from ProtocolError

#code, #details, #message, #request_id

Instance Method Summary collapse

Constructor Details

#initialize(message = "Server error", code: -32_000,, details: nil, request_id: nil) ⇒ ServerError



115
116
117
118
119
120
121
122
# File 'lib/vector_mcp/errors.rb', line 115

def initialize(message = "Server error", code: -32_000, details: nil, request_id: nil)
  # ServerError initialization
  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