mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-17 16:45:02 +00:00
pref: set strictQuery to throw. (#3994)
This commit is contained in:
@@ -19,7 +19,7 @@ export async function connectMongo(): Promise<Mongoose> {
|
|||||||
// Remove existing listeners to prevent duplicates
|
// Remove existing listeners to prevent duplicates
|
||||||
connectionMongo.connection.removeAllListeners('error');
|
connectionMongo.connection.removeAllListeners('error');
|
||||||
connectionMongo.connection.removeAllListeners('disconnected');
|
connectionMongo.connection.removeAllListeners('disconnected');
|
||||||
connectionMongo.set('strictQuery', false);
|
connectionMongo.set('strictQuery', 'throw');
|
||||||
|
|
||||||
connectionMongo.connection.on('error', async (error) => {
|
connectionMongo.connection.on('error', async (error) => {
|
||||||
console.log('mongo error', error);
|
console.log('mongo error', error);
|
||||||
|
Reference in New Issue
Block a user