Exception: VectorMCP::NotFoundError

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

Overview

Represents an error indicating a requested resource or entity was not found (-32001). Note: This uses a code typically outside the strict JSON-RPC server error range, but is common in practice for "Not Found" scenarios.

Instance Attribute Summary

Attributes inherited from ProtocolError

#code, #details, #message, #request_id

Instance Method Summary collapse

Constructor Details

#initialize(message = "Not Found", details: nil, request_id: nil) ⇒ NotFoundError

Returns a new instance of NotFoundError.

Parameters:

  • message (String) (defaults to: "Not Found")

    The error message.

  • details (Hash, nil) (defaults to: nil)

    Additional details for the error (optional).

  • request_id (String, Integer, nil) (defaults to: nil)

    The ID of the originating request.



133
134
135
136
# File 'lib/vector_mcp/errors.rb', line 133

def initialize(message = "Not Found", details: nil, request_id: nil)
  VectorMCP.logger.debug("Initializing NotFoundError with code: -32001")
  super(message, code: -32_001, details: details, request_id: request_id)
end