mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 06:48:02 -05:00
Make tool call json decode error recoverable (#8233)
This commit is contained in:
@@ -76,7 +76,7 @@ def response_to_actions(
|
||||
try:
|
||||
arguments = json.loads(tool_call.function.arguments)
|
||||
except json.decoder.JSONDecodeError as e:
|
||||
raise RuntimeError(
|
||||
raise FunctionCallValidationError(
|
||||
f'Failed to parse tool call arguments: {tool_call.function.arguments}'
|
||||
) from e
|
||||
|
||||
|
||||
Reference in New Issue
Block a user