diff --git a/backend/app/routers/connections.py b/backend/app/routers/connections.py index dd0b1ce..a1e88da 100644 --- a/backend/app/routers/connections.py +++ b/backend/app/routers/connections.py @@ -131,6 +131,16 @@ async def send_connection_request( current_user: User = Depends(get_current_user), ): """Send a connection request to another user.""" + try: + return await _send_request_impl(body, request, background_tasks, db, current_user) + except HTTPException: + raise + except Exception as exc: + logger.error("send_connection_request UNHANDLED: %s", exc, exc_info=True) + raise HTTPException(status_code=500, detail=f"DEBUG: {type(exc).__name__}: {exc}") + + +async def _send_request_impl(body, request, background_tasks, db, current_user): # Resolve target result = await db.execute( select(User).where(User.umbral_name == body.umbral_name)