PolicyEngine / PolicyEngine/policyengine-core
Improve error handling in parameter operations
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 22
- Forks
- 30
- Avg merge
- 14h 33m
- Merged PRs (30d)
- 7
Description
The parameter operations module has several areas where error handling could be improved:
- In , there are bare except blocks that catch all exceptions, making debugging difficult.
- The error messages aren't specific enough about what went wrong or how to fix it.
- Generic ValueError exceptions are used instead of specific error types.
Proposed Solution
Create a new class that:
- Includes the full parameter path that was requested
- Specifies exactly which part of the path failed
- Provides better guidance for bracket syntax errors
- Suggests similar parameter names when there's a near match
This will make debugging parameter-related issues much easier for users and developers.
Related files:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the parameter operations module and inspect its bare exception handlers, generic ValueError uses, and existing parameter-path handling. Review how bracket syntax and near matches are currently handled; the work is done when errors identify the full path and failed segment, provide bracket-syntax guidance, and suggest near-matching parameter names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100