Spaces:
Runtime error
Runtime error
Commit
·
43e11ef
1
Parent(s):
5b29589
fix
Browse files- db/mongoDB.py +2 -2
db/mongoDB.py
CHANGED
@@ -36,8 +36,8 @@ async def connect_to_mongo():
|
|
36 |
logger.info(f"🔸 Connecting to MongoDB Atlas...")
|
37 |
|
38 |
if not config.MONGODB_CLOUD_URI or not config.DB_NAME:
|
39 |
-
logger.error("❌
|
40 |
-
raise ConfigurationError("
|
41 |
|
42 |
try:
|
43 |
# 1. Khởi tạo client bất đồng bộ
|
|
|
36 |
logger.info(f"🔸 Connecting to MongoDB Atlas...")
|
37 |
|
38 |
if not config.MONGODB_CLOUD_URI or not config.DB_NAME:
|
39 |
+
logger.error("❌ MONGODB_CLOUD_URI hoặc DB_NAME chưa được thiết lập trong biến môi trường.")
|
40 |
+
raise ConfigurationError("MONGODB_CLOUD_URI and DB_NAME must be set.")
|
41 |
|
42 |
try:
|
43 |
# 1. Khởi tạo client bất đồng bộ
|