Skip to content

fix(tools): return ErrorArtifact instead of raising StopIteration for unsupported file types - #2373

Open
Hugo-DDT wants to merge 1 commit into
griptape-ai:mainfrom
Hugo-DDT:fix/file-manager-tool-stopiteration
Open

Hugo-DDT wants to merge 1 commit into
griptape-ai:mainfrom
Hugo-DDT:fix/file-manager-tool-stopiteration

Conversation

@Hugo-DDT

Copy link
Copy Markdown

Describe your changes

FileManagerTool.load_files_from_disk raised an uncaught StopIteration when a file's MIME type matched no loader key (e.g. application/json). Use a None default for next(...) and return a descriptive ErrorArtifact instead.

Added test_load_files_from_disk_with_unsupported_file_type covering the .json case.

Issue ticket number and link

Closes #2372

…nagerTool

load_files_from_disk raised an uncaught StopIteration when a file's MIME
type matched no loader key (e.g. application/json). Use a None default and
return a descriptive ErrorArtifact instead.
Copilot AI balanced review requested due to automatic review settings October 11, 2026 06:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

[BUG] FileManagerTool.load_files_from_disk raises uncaught StopIteration for unsupported file types

2 participants