From 0ae39ecacc33bb537fe18735ad6f93da15cad076 Mon Sep 17 00:00:00 2001 From: Damir Date: Wed, 8 Apr 2026 00:36:51 +0300 Subject: [PATCH] update --- backend/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/main.py b/backend/main.py index 595bfa4..cd0b5c4 100644 --- a/backend/main.py +++ b/backend/main.py @@ -93,6 +93,7 @@ def register(req: RegisterRequest, db: Session = Depends(get_db)): email = req.email.strip().lower() if not email or not req.password: raise HTTPException(status_code=400, detail="Email and password are required") + pw_bytes_len = len(req.password.encode("utf-8")) _password_ok_or_400(req.password) try: @@ -118,7 +119,10 @@ def register(req: RegisterRequest, db: Session = Depends(get_db)): raise HTTPException(status_code=500, detail=f"Database error: {str(e)}") except Exception as e: db.rollback() - raise HTTPException(status_code=500, detail=f"Internal error: {str(e)}") + raise HTTPException( + status_code=500, + detail=f"Internal error: {str(e)} (password_bytes_len={pw_bytes_len})", + ) @app.post("/auth/login")