Materials-Consortia / Materials-Consortia/optimade-python-tools
Better response error messages
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 91
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
At the moment, unhandled exceptions get passed out as general http exceptions with the full Python traceback.
I think we should make the general exception handle these to better provide error messages to users, even if that error is just telling them that it's not their fault.
As another specific example, it would be nice to detect when a user has forgotten the version in a URL (pending the conversations about unversioned URLs in the spec), or if they specify a version that doesn't exist, then we can spit out an error message with the list of valid versions.
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
No files, tests, or entry points are named. Start by locating the general exception handler and the URL version-validation path, then review the relevant API error-response tests if present; done means user-facing errors no longer expose full tracebacks and invalid or missing versions report the valid choices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100