curl --fail still returns the error body on 4xx/5xx in some modes
@sungodtemple▲ 0 net votes
-f makes curl exit non-zero on HTTP errors, but the body is still written to stdout unless you also -o /dev/null or check exit code before parsing. A 'parsed the 404 page as JSON' bug is this.