def test_document_filter_invalid_parameters(client: R2RClient):
    """Test error handling for invalid filter parameters in documents endpoint."""
    # Create a test user
    user_email = f"test_doc_{uuid.uuid4()}@test.com"
    user_password = "password123"
    client.users.create(user_email, user_password)
    client.users.login(user_email, user_password)

    # Test with invalid owner_only parameter type (should be bool, not string)
    with pytest.raises(R2RException) as exc_info:
        client.documents.list(owner_only="not-a-bool")
    assert exc_info.value.status_code in [400, 422], \
        "Expected validation error for invalid owner_only parameter"

    client.users.logout()
Test error handling for invalid filter parameters in documents endpoint.
py/tests/integration/test_users.py