The API returned an error page instead of JSON
CommonA 4xx or 5xx response, a login redirect or a proxy error page. curl prints it like any other response unless told to fail.
Confirm
curl -s -o body.out -w '%{http_code}\n' URL; head -c 300 body.outA status of 400 or above, and HTML or text where JSON should be
Fix
- Make the pipeline fail on HTTP errors: set -o pipefail, then curl -sf URL | jq ….
- Or capture the status first (curl -s -o body.out -w '%{http_code}'), check it, and only then run jq on body.out, which also keeps the error body for the log.