# Function isErrorInBody

- isErrorInBody(result: Record<string, unknown>): boolean

  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:

      {
        "@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.

  #### Parameters

  - result: Record<string, unknown>

  #### Returns boolean

  - Defined in tools/shared/feedUtils.ts:226