File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,8 +255,11 @@ function getClient() {
255255 queryPerformanceMonitor . onQuery ( "writer" , log ) ;
256256 } ) ;
257257
258- // connect eagerly
259- client . $connect ( ) ;
258+ // Connect eagerly, catch any exception and log
259+ // Prisma will connect on use anyway
260+ client . $connect ( ) . catch ( ( error ) => {
261+ logger . error ( "Failed to eagerly connect prisma client (writer)" , { error } ) ;
262+ } ) ;
260263
261264 console . log ( `🔌 prisma client connected` ) ;
262265
@@ -378,8 +381,11 @@ function getReplicaClient() {
378381 queryPerformanceMonitor . onQuery ( "replica" , log ) ;
379382 } ) ;
380383
381- // connect eagerly
382- replicaClient . $connect ( ) ;
384+ // Connect eagerly, catch any exception and log
385+ // Prisma will connect on use anyway
386+ replicaClient . $connect ( ) . catch ( ( error ) => {
387+ logger . error ( "Failed to eagerly connect prisma client (replica)" , { error } ) ;
388+ } ) ;
383389
384390 console . log ( `🔌 read replica connected` ) ;
385391
You can’t perform that action at this time.
0 commit comments