@@ -6,7 +6,15 @@ import { MongoError } from '../error';
6
6
* An error indicating that something went wrong specifically with MongoDB Client Encryption
7
7
*/
8
8
export class MongoCryptError extends MongoError {
9
- /** @internal */
9
+ /**
10
+ * Do not use this constructor. It is meant for internal use only.
11
+ *
12
+ * @remarks
13
+ * This class is only meant to be constructed within the driver. As such this constructor is
14
+ * not subject to compatibility guarantees under semantic versioning and may change at any time.
15
+ *
16
+ * @public
17
+ **/
10
18
constructor ( message : string , options : { cause ?: Error } = { } ) {
11
19
super ( message , options ) ;
12
20
}
@@ -22,7 +30,15 @@ export class MongoCryptError extends MongoError {
22
30
* An error indicating an invalid argument was provided to an encryption API.
23
31
*/
24
32
export class MongoCryptInvalidArgumentError extends MongoCryptError {
25
- /** @internal */
33
+ /**
34
+ * Do not use this constructor. It is meant for internal use only.
35
+ *
36
+ * @remarks
37
+ * This class is only meant to be constructed within the driver. As such this constructor is
38
+ * not subject to compatibility guarantees under semantic versioning and may change at any time.
39
+ *
40
+ * @public
41
+ **/
26
42
constructor ( message : string ) {
27
43
super ( message ) ;
28
44
}
@@ -37,7 +53,15 @@ export class MongoCryptInvalidArgumentError extends MongoCryptError {
37
53
*/
38
54
export class MongoCryptCreateDataKeyError extends MongoCryptError {
39
55
encryptedFields : Document ;
40
- /** @internal */
56
+ /**
57
+ * Do not use this constructor. It is meant for internal use only.
58
+ *
59
+ * @remarks
60
+ * This class is only meant to be constructed within the driver. As such this constructor is
61
+ * not subject to compatibility guarantees under semantic versioning and may change at any time.
62
+ *
63
+ * @public
64
+ **/
41
65
constructor ( encryptedFields : Document , { cause } : { cause : Error } ) {
42
66
super ( `Unable to complete creating data keys: ${ cause . message } ` , { cause } ) ;
43
67
this . encryptedFields = encryptedFields ;
@@ -54,7 +78,15 @@ export class MongoCryptCreateDataKeyError extends MongoCryptError {
54
78
*/
55
79
export class MongoCryptCreateEncryptedCollectionError extends MongoCryptError {
56
80
encryptedFields : Document ;
57
- /** @internal */
81
+ /**
82
+ * Do not use this constructor. It is meant for internal use only.
83
+ *
84
+ * @remarks
85
+ * This class is only meant to be constructed within the driver. As such this constructor is
86
+ * not subject to compatibility guarantees under semantic versioning and may change at any time.
87
+ *
88
+ * @public
89
+ **/
58
90
constructor ( encryptedFields : Document , { cause } : { cause : Error } ) {
59
91
super ( `Unable to create collection: ${ cause . message } ` , { cause } ) ;
60
92
this . encryptedFields = encryptedFields ;
@@ -72,7 +104,15 @@ export class MongoCryptCreateEncryptedCollectionError extends MongoCryptError {
72
104
export class MongoCryptAzureKMSRequestError extends MongoCryptError {
73
105
/** The body of the http response that failed, if present. */
74
106
body ?: Document ;
75
- /** @internal */
107
+ /**
108
+ * Do not use this constructor. It is meant for internal use only.
109
+ *
110
+ * @remarks
111
+ * This class is only meant to be constructed within the driver. As such this constructor is
112
+ * not subject to compatibility guarantees under semantic versioning and may change at any time.
113
+ *
114
+ * @public
115
+ **/
76
116
constructor ( message : string , body ?: Document ) {
77
117
super ( message ) ;
78
118
this . body = body ;
0 commit comments