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' }); Copy
throw new MCPServerError( 'Configuration not found', 'CONFIG_ERROR', 500, { configFile: 'mcp.json' });
Create a new MCP Server error
Human-readable error message
Machine-readable error code (e.g., 'VALIDATION_ERROR')
HTTP status code (default: 500)
Optional
Optional additional error details for debugging
Readonly
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.
Example