Skip to content

Commit d1ab5c2

Browse files
committed
fix: error
1 parent 601f42e commit d1ab5c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

shared/database/mongodb/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const connectToMongoDB = async () => {
1717
return cachedConnection;
1818
} catch (error) {
1919
console.error('Error connecting to database', error);
20-
throw error;
20+
// throw error; // Prevent application crash
21+
return null;
2122
}
2223
};

0 commit comments

Comments
 (0)