Commit 08b6f594 by Finley Ge Committed by GitHub

pref: set strictQuery to throw. (#3994)

parent 90d13ee3
......@@ -19,7 +19,7 @@ export async function connectMongo(): Promise<Mongoose> {
// Remove existing listeners to prevent duplicates
connectionMongo.connection.removeAllListeners('error');
connectionMongo.connection.removeAllListeners('disconnected');
connectionMongo.set('strictQuery', false);
connectionMongo.set('strictQuery', 'throw');
connectionMongo.connection.on('error', async (error) => {
console.log('mongo error', error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment