Skip to content

Commit aaa2ebe

Browse files
committed
fix(NODE-5484): update constructors to not take error
1 parent 564d117 commit aaa2ebe

File tree

6 files changed

+50
-49
lines changed

6 files changed

+50
-49
lines changed

src/bulk/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ export class MongoBulkWriteError extends MongoServerError {
605605
*
606606
* @remarks
607607
* This class is only meant to be constructed within the driver. This constructor is
608-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
608+
* not subject to semantic versioning compatibility guarantees and may change at any time.
609609
*
610610
* @public
611611
**/

src/client-side-encryption/errors.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class MongoCryptError extends MongoError {
1313
*
1414
* @remarks
1515
* This class is only meant to be constructed within the driver. This constructor is
16-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
16+
* not subject to semantic versioning compatibility guarantees and may change at any time.
1717
*
1818
* @public
1919
**/
@@ -39,7 +39,7 @@ export class MongoCryptInvalidArgumentError extends MongoCryptError {
3939
*
4040
* @remarks
4141
* This class is only meant to be constructed within the driver. This constructor is
42-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
42+
* not subject to semantic versioning compatibility guarantees and may change at any time.
4343
*
4444
* @public
4545
**/
@@ -64,7 +64,7 @@ export class MongoCryptCreateDataKeyError extends MongoCryptError {
6464
*
6565
* @remarks
6666
* This class is only meant to be constructed within the driver. This constructor is
67-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
67+
* not subject to semantic versioning compatibility guarantees and may change at any time.
6868
*
6969
* @public
7070
**/
@@ -91,7 +91,7 @@ export class MongoCryptCreateEncryptedCollectionError extends MongoCryptError {
9191
*
9292
* @remarks
9393
* This class is only meant to be constructed within the driver. This constructor is
94-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
94+
* not subject to semantic versioning compatibility guarantees and may change at any time.
9595
*
9696
* @public
9797
**/
@@ -119,7 +119,7 @@ export class MongoCryptAzureKMSRequestError extends MongoCryptError {
119119
*
120120
* @remarks
121121
* This class is only meant to be constructed within the driver. This constructor is
122-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
122+
* not subject to semantic versioning compatibility guarantees and may change at any time.
123123
*
124124
* @public
125125
**/

src/cmap/connect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ function makeSocks5Connection(options: MakeConnectionOptions, callback: Callback
502502
function connectionFailureError(type: ErrorHandlerEventName, err: Error) {
503503
switch (type) {
504504
case 'error':
505-
return new MongoNetworkError(err);
505+
return new MongoNetworkError('error', { cause: err });
506506
case 'timeout':
507507
return new MongoNetworkTimeoutError('connection timed out');
508508
case 'close':

src/cmap/errors.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class PoolClosedError extends MongoDriverError {
1616
*
1717
* @remarks
1818
* This class is only meant to be constructed within the driver. This constructor is
19-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
19+
* not subject to semantic versioning compatibility guarantees and may change at any time.
2020
*
2121
* @public
2222
**/
@@ -45,7 +45,7 @@ export class PoolClearedError extends MongoNetworkError {
4545
*
4646
* @remarks
4747
* This class is only meant to be constructed within the driver. This constructor is
48-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
48+
* not subject to semantic versioning compatibility guarantees and may change at any time.
4949
*
5050
* @public
5151
**/
@@ -76,7 +76,7 @@ export class PoolClearedOnNetworkError extends PoolClearedError {
7676
*
7777
* @remarks
7878
* This class is only meant to be constructed within the driver. This constructor is
79-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
79+
* not subject to semantic versioning compatibility guarantees and may change at any time.
8080
*
8181
* @public
8282
**/
@@ -104,7 +104,7 @@ export class WaitQueueTimeoutError extends MongoDriverError {
104104
*
105105
* @remarks
106106
* This class is only meant to be constructed within the driver. This constructor is
107-
* not subject to semantic versioning compatiblity guarantees and may change at any time.
107+
* not subject to semantic versioning compatibility guarantees and may change at any time.
108108
*
109109
* @public
110110
**/

0 commit comments

Comments
 (0)