From ea491a4b8968d183f0dd474c62286571853bf5e1 Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Thu, 5 Mar 2026 20:54:38 +0800 Subject: [PATCH] Add temporary diagnostic wrapper to send_connection_request Exposes actual exception type and message in 500 response detail to identify the unhandled error. Will be removed after diagnosis. Co-Authored-By: Claude Opus 4.6 --- backend/app/routers/connections.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)