Skip to content

fix(tools): add file check and exception handling for JSON snapshot l… - #16

Open
HibaDawood wants to merge 1 commit into
chauncygu:mainfrom
HibaDawood:patch-1
Open

fix(tools): add file check and exception handling for JSON snapshot l…#16
HibaDawood wants to merge 1 commit into
chauncygu:mainfrom
HibaDawood:patch-1

Conversation

@HibaDawood

Copy link
Copy Markdown

Fixes potential FileNotFoundError and JSONDecodeError during import in claw-code/src/tools.py.

…oading

Add Path.exists() check and gracefully handle JSONDecodeError or missing keys when loading tools_snapshot.json to prevent import crashes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant