HydraIssues

hydraheadipad: body discovery returns JSON parse error 'The data couldn't be read because it is missing'
open bug Project: hydraheadipad Reporter: 21 May 2026 19:41

Description

## Symptom

Body discovery occasionally fails with a JSON parse error: `No body available: The data couldn't be read because it is missing.`

This is a Foundation JSON decoding error indicating the API returned a response that was missing an expected field, returned empty body, or returned an unexpected format.

## Log evidence

From issue #237 (bxl1-test/ad6, 2026-05-19 00:05):
```
00:05:16 [prev] Discovering body for 'rupelmonde-castle-viewer' in bxl1-test/ad6
00:05:16 [prev] No body available: The data couldn't be read because it is missing.
00:06:39 [prev] Discovering body for 'rupelmonde-castle-viewer' in bxl1-test/ad6
00:06:39 [prev] Found fluffy-dumpling-87 (stream_count:0, host:10.110.15.197)
```

Also in issue #234 (bxl1-test/ad6, 2026-05-19 21:28):
```
21:28:18 Discovering body for 'mercator-talks' in bxl1-test/ad6
21:28:18 No body available: The data couldn't be read because it is missing.
```

In both cases a retry shortly after succeeds, suggesting the API returned a transient malformed or empty response rather than a stable 'no body' state.

## Impact

The user sees the 'no body available' error screen even though a body comes online seconds later. The app must be tapped again to retry.

## Fix direction

- Log the raw API response when this error occurs for easier diagnosis
- Distinguish between 'no body in the response' (legitimate empty list) and 'JSON parse failed' (unexpected response format) — use different error messages for each
- Consider auto-retry on parse failure vs. on empty list