European Parliament MCP Server API - v1.0.1
    Preparing search index...

    Class MCPServerError

    Base error class for European Parliament MCP Server

    Provides structured error handling with error codes, HTTP status codes, and optional details for debugging. All errors extend this base class.

    throw new MCPServerError(
    'Configuration not found',
    'CONFIG_ERROR',
    500,
    { configFile: 'mcp.json' }
    );

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Create a new MCP Server error

      Parameters

      • message: string

        Human-readable error message

      • code: string

        Machine-readable error code (e.g., 'VALIDATION_ERROR')

      • statusCode: number = 500

        HTTP status code (default: 500)

      • Optionaldetails: unknown

        Optional additional error details for debugging

      Returns MCPServerError

    Properties

    code: string

    Machine-readable error code (e.g., 'VALIDATION_ERROR')

    statusCode: number = 500

    HTTP status code (default: 500)

    details?: unknown

    Optional additional error details for debugging