[Bug] Anthropic API Error: 400 Bad Request when parsing JSON data from websites

Resolved 💬 3 comments Opened Mar 5, 2026 by Jstyle1 Closed Mar 9, 2026

Bug Description
getting random API error 400 when running a skill which is parsing json data from websites

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.69
  • Feedback ID: 5c935518-dddf-45a1-99c0-333b2d4cdce3

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: no low surrogate in string: line 1 column 199773 (char 199772)\"},\"request_id\":\"req_011CYjy2iGEzKZgUQVQgDU1C\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:292:8975)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:331:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-05T12:53:54.546Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: no low surrogate in string: line 1 column 199810 (char 199809)\"},\"request_id\":\"req_011CYjy3dTYsRJdJ3ceTE2Lp\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:292:8975)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:331:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-05T12:54:06.963Z"},{"error":"Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: no low surrogate in string: line 1 column 199810 (char 199809)\"},\"request_id\":\"req_011CYjy3dTYsRJdJ3ceTE2Lp\"}\n    at HXT (/$bunfs/root/src/entrypoints/cli.js:2052:1172)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:3703:879)\n    at async Qp$ (/$bunfs/root/src/entrypoints/cli.js:2441:3706)\n    at async lp$ (/$bunfs/root/src/entrypoints/cli.js:2441:1078)\n    at async YY4 (/$bunfs/root/src/entrypoints/cli.js:12645:2536)\n    at async hg_ (/$bunfs/root/src/entrypoints/cli.js:12643:3808)\n    at async hv7 (/$bunfs/root/src/entrypoints/cli.js:12782:22786)\n    at async kF_ (/$bunfs/root/src/entrypoints/cli.js:12782:21986)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:12793:9188)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:12772:5512)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-05T12:54:06.967Z"},{"error":"Error: Error during compaction: Error: API Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"The request body is not valid JSON: no low surrogate in string: line 1 column 199810 (char 199809)\"},\"request_id\":\"req_011CYjy3dTYsRJdJ3ceTE2Lp\"}\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:3703:1190)\n    at async Qp$ (/$bunfs/root/src/entrypoints/cli.js:2441:3706)\n    at async lp$ (/$bunfs/root/src/entrypoints/cli.js:2441:1078)\n    at async YY4 (/$bunfs/root/src/entrypoints/cli.js:12645:2536)\n    at async hg_ (/$bunfs/root/src/entrypoints/cli.js:12643:3808)\n    at async hv7 (/$bunfs/root/src/entrypoints/cli.js:12782:22786)\n    at async kF_ (/$bunfs/root/src/entrypoints/cli.js:12782:21986)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:12793:9188)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:12772:5512)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-05T12:54:06.967Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗