openclimatefix / openclimatefix/quartz-api
[bug] DP validation exception requesting more than 7 day window
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10
- Forks
- 32
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 13
Description
Describe the bug
If you request a window of more than 7 days, the API returns a 500 Internal Server Error due to a lack of validation on the input for this, and passing straight through to the DP.
Expected behavior
Should validate user input, and return a 422 response if doesn't match allowed input rules
Contributor guide
No contributing guide indexed for this repository
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
Start by locating the API endpoint that accepts the requested window and review its existing input validation and error-handling tests. Reproduce a request exceeding seven days, then verify that invalid windows return HTTP 422 instead of 500 while valid requests continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100