diff options
Diffstat (limited to 'autogpts/autogpt/autogpt/core/utils/json_utils.py')
-rw-r--r-- | autogpts/autogpt/autogpt/core/utils/json_utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/autogpts/autogpt/autogpt/core/utils/json_utils.py b/autogpts/autogpt/autogpt/core/utils/json_utils.py index 0374a85c1..45650427d 100644 --- a/autogpts/autogpt/autogpt/core/utils/json_utils.py +++ b/autogpts/autogpt/autogpt/core/utils/json_utils.py @@ -39,7 +39,7 @@ def json_loads(json_str: str) -> Any: "JSON parse errors:\n" + "\n".join(str(e) for e in json_result.errors) ) - if json_result.object is demjson3.undefined: + if json_result.object in (demjson3.syntax_error, demjson3.undefined): raise ValueError( f"Failed to parse JSON string: {json_str}", *json_result.errors ) |