Exception: MCP::CancelledError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mcp/cancelled_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "Request was cancelled", request_id: nil, reason: nil) ⇒ CancelledError

Returns a new instance of CancelledError.



7
8
9
10
11
# File 'lib/mcp/cancelled_error.rb', line 7

def initialize(message = "Request was cancelled", request_id: nil, reason: nil)
  super(message)
  @request_id = request_id
  @reason = reason
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



5
6
7
# File 'lib/mcp/cancelled_error.rb', line 5

def reason
  @reason
end

#request_idObject (readonly)

Returns the value of attribute request_id.



5
6
7
# File 'lib/mcp/cancelled_error.rb', line 5

def request_id
  @request_id
end