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 <noreply@anthropic.com>
This commit is contained in:
parent
87d232cbcd
commit
ea491a4b89
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user