REFACTOR API gateway fix 4
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user