Thrown when the European Parliament API returns an error or
when communication with the API fails. Preserves the original
status code from the upstream API.
Example
constresponse = awaitfetch(epApiUrl); if (!response.ok) { thrownewEPAPIError( 'Failed to fetch MEP data', response.status, { url:epApiUrl, status:response.statusText } ); }
EP API error for European Parliament API failures
Thrown when the European Parliament API returns an error or when communication with the API fails. Preserves the original status code from the upstream API.
Example