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

    API Error thrown when European Parliament API requests fail.

    When thrown from BaseEPClient's HTTP layer, the message always includes the numeric HTTP status code and, when present, the HTTP reason phrase (statusText). Some HTTP/2 responses omit statusText, in which case the message contains only the status code — the status code is therefore always surfaced in the message, never empty.

    Message format: EP API request failed: <status>[ <statusText>]

    // HTTP/1.1 with a reason phrase
    throw new APIError('EP API request failed: 404 Not Found', 404, { endpoint: '/meps/999999' });

    // HTTP/2 where statusText is empty
    throw new APIError('EP API request failed: 404', 404, { endpoint: '/meps/999999' });

    Hierarchy

    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • message: string
      • OptionalstatusCode: number
      • Optionaldetails: unknown

      Returns APIError

    Properties

    details?: unknown
    statusCode?: number