Code Blocks Split Wrong
The Problem
Symptoms
Real-World Example
Original documentation:
```python
def authenticate_user(username, password):
"""
Authenticates a user with username and password.
Returns JWT token on success.
"""
if not username or not password:
raise ValueError("Credentials required")
user = db.query(User).filter_by(username=username).first()
if not user or not verify_password(password, user.password_hash):
raise AuthenticationError("Invalid credentials")
token = generate_jwt(user.id)
return {"token": token, "expires": 3600}Context and Dependencies
Documentation and Code Separation
How to Solve
Last updated

