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

    Class ValidationError

    Validation error for input validation failures

    Thrown when user input fails validation (e.g., invalid country code, out of range limit, malformed ID). Always returns HTTP 400 status.

    if (!isValidCountryCode(country)) {
    throw new ValidationError(
    'Invalid country code',
    { country, expected: 'ISO 3166-1 alpha-2' }
    );
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    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