We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 601f42e commit d1ab5c2Copy full SHA for d1ab5c2
1 file changed
shared/database/mongodb/config.ts
@@ -17,6 +17,7 @@ export const connectToMongoDB = async () => {
17
return cachedConnection;
18
} catch (error) {
19
console.error('Error connecting to database', error);
20
- throw error;
+ // throw error; // Prevent application crash
21
+ return null;
22
}
23
};
0 commit comments