From 735f8c233c1311ccb862696e413a072e3ce41ed0 Mon Sep 17 00:00:00 2001 From: Urtzi Alfaro Date: Sat, 26 Jul 2025 20:14:17 +0200 Subject: [PATCH] REFACTOR API gateway fix 4 --- gateway/app/routes/tenant.py | 12 ------------ services/auth/app/api/auth.py | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/gateway/app/routes/tenant.py b/gateway/app/routes/tenant.py index 2bb140bb..426a8084 100644 --- a/gateway/app/routes/tenant.py +++ b/gateway/app/routes/tenant.py @@ -180,18 +180,6 @@ async def _proxy_request(request: Request, target_path: str, service_url: str): content=content ) - except httpx.TimeoutError: - logger.error(f"Timeout calling {service_url}{target_path}") - raise HTTPException( - status_code=504, - detail=f"Service timeout" - ) - except httpx.RequestError as e: - logger.error(f"Request error calling {service_url}{target_path}: {e}") - raise HTTPException( - status_code=503, - detail=f"Service unavailable" - ) except Exception as e: logger.error(f"Unexpected error proxying to {service_url}{target_path}: {e}") raise HTTPException( diff --git a/services/auth/app/api/auth.py b/services/auth/app/api/auth.py index 014e9a44..35a6ee76 100644 --- a/services/auth/app/api/auth.py +++ b/services/auth/app/api/auth.py @@ -96,7 +96,7 @@ async def register( metrics = get_metrics_collector(request) try: - result = await AuthService.register(user_data, db) + result = await AuthService.register_user_with_tokens(user_data.email, user_data.email, user_data.full_name, db) # Record successful registration if metrics: