Skip to content

Commit

Permalink
Update json patch handler
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Feb 6, 2025
1 parent 213ef53 commit ee07e92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
"jsonpatch<2.0,>=1.33",
]
name = "trustcall"
version = "0.0.34"
version = "0.0.35"
description = "Tenacious & trustworthy tool calling built on LangGraph."
readme = "README.md"

Expand Down
4 changes: 2 additions & 2 deletions trustcall/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ def _teardown(
)
)
updated_docs[tc["id"]] = str(json_doc_id)
except (jsonpatch.JsonPatchConflict, JSONDecodeError) as e:
except Exception as e:
logger.error(f"Could not apply patch: {e}")
if rt:
rt.error = f"Could not apply patch: {repr(e)}"
Expand Down Expand Up @@ -1450,7 +1450,7 @@ def _get_message_op(
},
}
)
except (jsonpatch.JsonPatchConflict, JSONDecodeError) as e:
except Exception as e:
if rt:
rt.error = f"Could not apply patch: {repr(e)}"
logger.error(f"Could not apply patch: {repr(e)}")
Expand Down

0 comments on commit ee07e92

Please sign in to comment.