feat(api): standardize REST contracts and auth
This commit is contained in:
@@ -61,7 +61,7 @@ async def get_current_metadata_user(
|
||||
)
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
||||
detail=f"Metadata database error: {exc}",
|
||||
detail="Metadata database is unavailable",
|
||||
) from exc
|
||||
if not user or not user.is_active:
|
||||
raise HTTPException(
|
||||
@@ -80,7 +80,7 @@ async def get_current_metadata_user(
|
||||
)
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
||||
detail=f"Metadata database error: {exc}",
|
||||
detail="Metadata database is unavailable",
|
||||
) from exc
|
||||
return user
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ async def resolve_project_context(
|
||||
)
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
||||
detail=f"Metadata database error: {exc}",
|
||||
detail="Metadata database is unavailable",
|
||||
) from exc
|
||||
|
||||
return ProjectContext(
|
||||
|
||||
Reference in New Issue
Block a user