Sign in

    moonbitstack/moonmcp/exceptions does not have a README file

    FastMCPError

    pub(all) suberror FastMCPError {
    Mcp(
    ErrorData
    )
    Validation(String)
    Resource(String)
    Tool(String)
    Prompt(String)
    InvalidSignature(String)
    Client(String)
    NotFound(String)
    Disabled(String)
    ResourceSecurity(String)
    Authorisation(String)
    InsufficientScope(required_scopes~ : Array[String], message~ : String)
    } derive(Eq,
    Debug
    )

    Custom errors for moonmcp, mirroring fastmcp/exceptions.py.

    FastMCPError::equal

    FastMCPError::message

    fn FastMCPError::message(self : FastMCPError) -> String

    Render the human-readable message carried by the error.

    FastMCPError::not_equal

    fn FastMCPError::not_equal(x : FastMCPError, y : FastMCPError) -> Bool

    FastMCPError::output

    fn FastMCPError::output(self : FastMCPError, logger : &Logger) -> Unit

    FastMCPError::to_string

    fn FastMCPError::to_string(self : FastMCPError) -> String

    insufficient_scope

    fn insufficient_scope(required_scopes : Array[String]) -> FastMCPError

    Construct an InsufficientScope error with the standard message.

    to_mcp_error

    fn to_mcp_error(exc : FastMCPError, default_code? : Int) ->
    ErrorData

    Translate a moonmcp error into a wire-format error payload.

    NotFound, Disabled and Validation map to invalid_params (-32602); an existing Mcp payload is returned unchanged so an explicit code chosen upstream survives translation; everything else falls back to default_code (internal_error by default).

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io