File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,23 @@ export class PoolClearedError extends MongoNetworkError {
3939 }
4040}
4141
42+ /**
43+ * An error indicating that a connection pool has been cleared after the monitor for that server timed out.
44+ * @category Error
45+ */
46+ export class PoolClearedOnNetworkError extends MongoNetworkError {
47+ /** The address of the connection pool */
48+ address : string ;
49+ constructor ( pool : ConnectionPool ) {
50+ super ( `Connection to ${ pool . address } interrupted due to server monitor timeout` ) ;
51+ this . address = pool . address ;
52+ }
53+
54+ override get name ( ) : string {
55+ return 'PoolClearedOnNetworkError' ;
56+ }
57+ }
58+
4259/**
4360 * An error thrown when a request to check out a connection times out
4461 * @category Error
You can’t perform that action at this time.
0 commit comments