Skip to content

Conversation

@om051105
Copy link
Contributor

@om051105 om051105 commented Jan 6, 2026

Description

This PR addresses the TODO in taskweaver/utils/app_utils.py by implementing validation logic for the taskweaver_config.json file.

Changes

  • Implemented json.load to verify the configuration file contains valid JSON.
  • Added a check to ensure the root element is a dictionary (dict), as expected for configuration files.
  • Added error handling for json.JSONDecodeError and OSError to prevent crashes when reading the file.

Related Issues

Resolves TODO in taskweaver/utils/app_utils.py

Copy link
Collaborator

@liqul liqul left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.

@liqul liqul merged commit 5de27a6 into microsoft:main Jan 7, 2026
2 checks passed
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.

2 participants