The error path was throwing at r.json() parsing — r.text() lets us log
the actual raw response before trying to parse it as JSON.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Log response status, raw data, and item count to diagnose
why uploaded images don't appear in media browser grid.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously when the content API returned a non-ok response,
saveField would set error state but still resolve the promise.
This caused downstream code to think save succeeded when it failed.
Now properly extracts error message from response and throws.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>