HF RL Explorer

Task: Implement MongoDB Connection Validation with Proper Error Handling

Task: Implement MongoDB Connection Validation with Proper Error Handling: a task in Terminal-Lego-15k (Harbor dataset). You need to create a Python module that properly validates MongoDB client connections. The challenge is that PyMongo's MongoClient() constructor doesn't immediately verify the…

The task

You need to create a Python module that properly validates MongoDB client connections. The challenge is that PyMongo's `MongoClient()` constructor doesn't immediately verify the connection - it uses lazy connection, meaning connection errors only surface when you actually try to perform database operations.

Part of PrimeIntellect/Terminal-Lego-15k.