Detect an EP API "error-in-body" response.
Some feed endpoints return HTTP 200 but with a JSON body that contains an error field and no data array. Example:
error
data
{ "@id": "https://data.europarl.europa.eu/eli/dl/…", "error": "404 Not Found from POST …", "@context": { "error": { … } }} Copy
{ "@id": "https://data.europarl.europa.eu/eli/dl/…", "error": "404 Not Found from POST …", "@context": { "error": { … } }}
This function returns true when the parsed response has this shape, allowing callers to convert it to an empty feed response.
true
Detect an EP API "error-in-body" response.
Some feed endpoints return HTTP 200 but with a JSON body that contains an
errorfield and nodataarray. Example:This function returns
truewhen the parsed response has this shape, allowing callers to convert it to an empty feed response.