Invalid JSON Encoding Error During API Request
Resolved 💬 2 comments Opened Aug 8, 2025 by jexe Closed Aug 8, 2025
Bug Description
Getting a 400 error from the API mid-edit: 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
232122 (char 232121)"}}
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.72
- Feedback ID: bc0a674b-a250-4923-940a-34fff521408e
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 232122 (char 232121)\"}}\n at Q6.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:933:2303)\n at uP.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:950:2101)\n at uP.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:950:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async RRB.rZ1.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:24594)\n at async rZ1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:13631)\n at async RRB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:24445)\n at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:19427\n at async Iq0 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:5163)\n at async P11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:19397)","timestamp":"2025-08-08T19:33:54.508Z"},{"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 232122 (char 232121)\"}}\n at Q6.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:933:2303)\n at uP.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:950:2101)\n at uP.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:950:5315)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async RRB.rZ1.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:24594)\n at async rZ1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:13631)\n at async RRB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:24445)\n at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:19427\n at async Iq0 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:5163)\n at async P11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1743:19397)","timestamp":"2025-08-08T19:34:14.676Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗