Skip to content

Commit 2a61dd6

Browse files
remove message checking logic
1 parent dfc8f38 commit 2a61dd6

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

Diff for: src/client-side-encryption/auto_encrypter.ts

+4-13
Original file line numberDiff line numberDiff line change
@@ -365,19 +365,10 @@ export class AutoEncrypter {
365365
const client = await this._mongocryptdClient.connect();
366366
return client;
367367
} catch (error) {
368-
const { message } = error;
369-
if (
370-
message &&
371-
(message.match(/timed out after/) ||
372-
message.match(/ENOTFOUND/) ||
373-
message.match(/ECONNREFUSED/))
374-
) {
375-
throw new MongoRuntimeError(
376-
'Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn',
377-
{ cause: error }
378-
);
379-
}
380-
throw error;
368+
throw new MongoRuntimeError(
369+
'Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn',
370+
{ cause: error }
371+
);
381372
}
382373
}
383374

0 commit comments

Comments
 (0)