api_grade and api_day parsed the `date` query param with an unguarded datetime.date.fromisoformat, so a malformed or non-calendar value (notadate, 2026-13-40, 2026-02-30) raised ValueError and surfaced as a 500. Route the parse through a _parse_target_date helper that maps the ValueError to HTTPException(422); absent/empty and valid dates behave exactly as before. Add a route-level test asserting 422 on bad dates. |
||
|---|---|---|
| .. | ||
| accounts | ||
| api | ||
| core | ||
| data | ||
| notifications | ||
| web | ||
| conftest.py | ||
| test_drift_check.py | ||
| test_indexnow.py | ||
| test_seed_era5.py | ||
| test_warm_cities.py | ||
| test_warm_content.py | ||