# INTERNAL_FIO_STATEMENT_INVALID: Fio bank statement is malformed.

- Category: Platform
- HTTP status: 502
- Reference: https://docs.bizkithub.com/en/errors/INTERNAL_FIO_STATEMENT_INVALID

## What happened

A statement file received from Fio (GPC or transaction JSON) is missing required fields or breaks the expected structure (no 074 header, empty payload, unparseable transaction line). The offending row or snippet is appended to the error message.

## How to resolve

1. Re-fetch the statement from Fio — a one-off corrupted response can happen on flaky connections.
2. Inspect the snippet that follows the colon to see which line failed parsing, and compare with the Fio data file format spec.
3. If the structure is genuinely new (Fio rarely changes the GPC layout), `core/bank/fio/parseFioResponse*` must be updated.

## Example response

```json
{
  "state": "error",
  "code": 502,
  "message": "Fio bank statement is malformed.",
  "errorCode": "INTERNAL_FIO_STATEMENT_INVALID",
  "hint": "A statement file received from Fio (GPC or transaction JSON) is missing required fields or breaks the expected structure (no 074 header, empty payload, unparseable transaction line). The offending row or snippet is appended to the error message.",
  "documentationUrl": "https://docs.bizkithub.com/errors/INTERNAL_FIO_STATEMENT_INVALID"
}
```
