mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-07-07 14:45:00 +00:00
Update subprocess_cli.py
This commit is contained in:
parent
f73b7c60fe
commit
896679f58e
1 changed files with 2 additions and 1 deletions
|
@ -198,6 +198,7 @@ class SubprocessCLITransport(Transport):
|
|||
logger.warning("JSON buffer exceeded 1MB limit. Discarding buffered data: %s", json_buffer[:200])
|
||||
json_buffer = ""
|
||||
continue
|
||||
|
||||
try:
|
||||
data = json.loads(json_buffer)
|
||||
yield data
|
||||
|
@ -209,7 +210,7 @@ class SubprocessCLITransport(Transport):
|
|||
open_brackets = json_buffer.count("[") - json_buffer.count("]")
|
||||
|
||||
if open_braces == 0 and open_brackets == 0:
|
||||
logger.warning("Malformed JSON detected: %s", json_buffer[:200])
|
||||
logger.warning("Malformed JSON detected: %s", json_buffer[:200])
|
||||
raise SDKJSONDecodeError(json_buffer, e) from e
|
||||
|
||||
logger.debug(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue