()
| 307 | } |
| 308 | |
| 309 | get error(): MongoError | null { |
| 310 | const descriptionsWithError = Array.from(this.servers.values()).filter( |
| 311 | (sd: ServerDescription) => sd.error |
| 312 | ); |
| 313 | |
| 314 | if (descriptionsWithError.length > 0) { |
| 315 | return descriptionsWithError[0].error; |
| 316 | } |
| 317 | |
| 318 | return null; |
| 319 | } |
| 320 | |
| 321 | /** |
| 322 | * Determines if the topology description has any known servers |
no test coverage detected