Exception: VectorMCP::RateLimitExceededError

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

Overview

Represents an authentication attempt blocked by the configured limiter (-32029).

Instance Attribute Summary collapse

Attributes inherited from ProtocolError

#code, #details, #message, #request_id

Instance Method Summary collapse

Constructor Details

#initialize(message = "Too many authentication attempts", retry_after:, request_id: nil) ⇒ RateLimitExceededError

Returns a new instance of RateLimitExceededError.

Parameters:

  • message (String) (defaults to: "Too many authentication attempts")

    The error message.

  • retry_after (Integer)

    Seconds until the caller should retry.

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

    The ID of the originating request.



207
208
209
210
211
212
213
214
215
# File 'lib/vector_mcp/errors.rb', line 207

def initialize(message = "Too many authentication attempts", retry_after:, request_id: nil)
  @retry_after = retry_after
  super(
    message,
    code: -32_029,
    details: { retry_after: retry_after },
    request_id: request_id
  )
end

Instance Attribute Details

#retry_afterObject (readonly)

Returns the value of attribute retry_after.



202
203
204
# File 'lib/vector_mcp/errors.rb', line 202

def retry_after
  @retry_after
end