From 7c7346647c40124972ecafd3090f8bffe4ba2465 Mon Sep 17 00:00:00 2001 From: Robin Reyer <45331704+lumaghg@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:16:57 +0200 Subject: [PATCH 1/3] fix typo in error message --- src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index a4de8ed..3f54dc0 100644 --- a/src/client.ts +++ b/src/client.ts @@ -16,7 +16,7 @@ export class MongoClient { getCluster() { if (!this.#cluster) { - throw new MongoDriverError("MongoClient is no connected to the Database"); + throw new MongoDriverError("MongoClient is not connected to the Database"); } return this.#cluster; From 3747725dbe7d7988718d9e9c3814ca9f311c7c41 Mon Sep 17 00:00:00 2001 From: lumaghg Date: Wed, 3 Aug 2022 14:24:23 +0200 Subject: [PATCH 2/3] deno fmt --- src/client.ts | 4 +++- src/utils/srv.ts | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index 3f54dc0..1275927 100644 --- a/src/client.ts +++ b/src/client.ts @@ -16,7 +16,9 @@ export class MongoClient { getCluster() { if (!this.#cluster) { - throw new MongoDriverError("MongoClient is not connected to the Database"); + throw new MongoDriverError( + "MongoClient is not connected to the Database", + ); } return this.#cluster; diff --git a/src/utils/srv.ts b/src/utils/srv.ts index 56bac28..478f186 100644 --- a/src/utils/srv.ts +++ b/src/utils/srv.ts @@ -71,13 +71,15 @@ export class Srv { ); if (!(srvRecord?.length > 0)) { throw new SRVError( - `Expected at least one SRV record, received ${srvRecord?.length} for url ${url}`, + `Expected at least one SRV record, received ${srvRecord + ?.length} for url ${url}`, ); } const txtRecords = await this.resolver.resolveDns(url, "TXT"); if (txtRecords?.length !== 1) { throw new SRVError( - `Expected exactly one TXT record, received ${txtRecords?.length} for url ${url}`, + `Expected exactly one TXT record, received ${txtRecords + ?.length} for url ${url}`, ); } From ddaf20a98bbec6e13d2b0d7f4c87575131531a8d Mon Sep 17 00:00:00 2001 From: Robin Reyer <45331704+lumaghg@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:32:43 +0200 Subject: [PATCH 3/3] deno fmt --- src/utils/srv.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/srv.ts b/src/utils/srv.ts index 478f186..56bac28 100644 --- a/src/utils/srv.ts +++ b/src/utils/srv.ts @@ -71,15 +71,13 @@ export class Srv { ); if (!(srvRecord?.length > 0)) { throw new SRVError( - `Expected at least one SRV record, received ${srvRecord - ?.length} for url ${url}`, + `Expected at least one SRV record, received ${srvRecord?.length} for url ${url}`, ); } const txtRecords = await this.resolver.resolveDns(url, "TXT"); if (txtRecords?.length !== 1) { throw new SRVError( - `Expected exactly one TXT record, received ${txtRecords - ?.length} for url ${url}`, + `Expected exactly one TXT record, received ${txtRecords?.length} for url ${url}`, ); }