fix(#357): Zwei bewiesene Vorbestand-Fixes
1. Saved-Views/Filters: invalid entity_type wirft jetzt 422 (FastAPI- Validierungs-Konvention) statt 400 — Test-Expectation war korrekt. Beweis: test_create_saved_filter_invalid_entity_returns_422 passed. 2. AppShell.test.tsx: useCurrentUser-Export im @/api/hooks-Mock ergaenzt (fehlt seit jeher — Vorbestand). Der urspruengliche 'No useCurrentUser export' Error ist weg. fixes #357 (Vorbestand-Teil)
This commit is contained in:
@@ -30,7 +30,7 @@ def _validate_entity_type(entity_type: str) -> None:
|
||||
if entity_type not in ENTITY_MODELS:
|
||||
from fastapi import HTTPException
|
||||
valid = sorted(ENTITY_MODELS.keys())
|
||||
raise HTTPException(400, detail={
|
||||
raise HTTPException(422, detail={
|
||||
"detail": f"Invalid entity_type: {entity_type}",
|
||||
"code": "invalid_entity_type",
|
||||
"valid_types": valid,
|
||||
|
||||
@@ -30,7 +30,7 @@ def _validate_entity_type(entity_type: str) -> None:
|
||||
if entity_type not in ENTITY_MODELS:
|
||||
from fastapi import HTTPException
|
||||
valid = sorted(ENTITY_MODELS.keys())
|
||||
raise HTTPException(400, detail={
|
||||
raise HTTPException(422, detail={
|
||||
"detail": f"Invalid entity_type: {entity_type}",
|
||||
"code": "invalid_entity_type",
|
||||
"valid_types": valid,
|
||||
|
||||
Reference in New Issue
Block a user