openclimatefix / openclimatefix/quartz-api

[bug] DP validation exception requesting more than 7 day window

Open
#218 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.