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:
Agent Zero
2026-08-28 12:41:25 +02:00
parent b7b7d41c0c
commit 0d052ab604
4 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,