mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
pref: set strictQuery to throw. (#3994)
This commit is contained in:
parent
90d13ee3df
commit
08b6f594df
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue