18
18
- [ ` MongoNetworkError ` ] ( #MongoNetworkError )
19
19
- [ ` MongoServerError ` ] ( #MongoServerError )
20
20
- [ ` MongoSystemError ` ] ( #MongoSystemError )
21
+ - [ ` MongoCryptError ` ] ( #MongoCryptError )
21
22
- [ Test Plan] ( #Test-Plan )
22
23
- [ ` MongoAPIError ` ] ( #MongoAPIError-1 )
23
24
- [ ` MongoInvalidArgumentError ` ] ( #MongoInvalidArgumentError-1 )
32
33
## Errors
33
34
34
35
All errors are derived from the ` MongoError ` class which should ** never** be instantiated.
35
- There are four main error classes which stem from ` MongoError ` : ` MongoDriverError ` ,
36
- ` MongoNetworkError ` , ` MongoServerError ` , and ` MongoSystemError ` .
36
+ There are five main error classes which stem from ` MongoError ` : ` MongoDriverError ` ,
37
+ ` MongoNetworkError ` , ` MongoServerError ` , ` MongoCryptError ` and ` MongoSystemError ` .
37
38
38
39
### ` MongoError `
39
40
40
41
The base class from which all errors in the Node driver subclass.
41
42
` MongoError ` should ** never** be be directly instantiated.
42
43
43
44
``` mermaid
45
+
44
46
graph TD
45
- MongoError --- MongoDriverError
46
- MongoError --- MongoNetworkError
47
- MongoError --- MongoServerError
48
- MongoError --- MongoSystemError
49
- MongoDriverError --- MongoAPIError
50
- MongoDriverError --- MongoRuntimeError
51
-
52
- linkStyle 0 stroke:#116149
53
- linkStyle 1 stroke:#116149
54
- linkStyle 2 stroke:#116149
55
- linkStyle 3 stroke:#116149
56
- linkStyle 4 stroke:#116149
57
- linkStyle 5 stroke:#116149
58
-
59
- style MongoError fill:#13aa52,stroke:#21313c,color:#FAFBFC
60
- style MongoSystemError fill:#13aa52,stroke:#21313c,color:#FAFBFC
61
- style MongoNetworkError fill:#13aa52,stroke:#21313c,color:#FAFBFC
62
- style MongoServerError fill:#13aa52,stroke:#21313c,color:#FAFBFC
63
- style MongoDriverError fill:#13aa52,stroke:#21313c,color:#FAFBFC
64
- style MongoAPIError fill:#13aa52,stroke:#21313c,color:#FAFBFC
65
- style MongoRuntimeError fill:#13aa52,stroke:#21313c,color:#FAFBFC
47
+ MongoError:::node --- MongoDriverError
48
+ MongoError:::node --- MongoNetworkError
49
+ MongoError:::node --- MongoServerError
50
+ MongoError:::node --- MongoSystemError
51
+ MongoError:::node --- MongoCryptError
52
+ MongoDriverError:::node --- MongoAPIError
53
+ MongoDriverError:::node --- MongoRuntimeError
54
+
55
+ linkStyle 0,1,2,3,4,5,6 stroke:#116149
56
+ classDef node fill:#13aa52,stroke:#21313c,color:#FAFBFC
66
57
```
67
58
68
59
Children of ` MongoError ` include:
@@ -71,6 +62,7 @@ Children of `MongoError` include:
71
62
- [ ` MongoNetworkError ` ] ( #MongoNetworkError )
72
63
- [ ` MongoServerError ` ] ( #MongoServerError )
73
64
- [ ` MongoSystemError ` ] ( #MongoSystemError )
65
+ - [ ` MongoCryptError ` ] ( #MongoCryptError )
74
66
75
67
### ` MongoDriverError `
76
68
@@ -144,6 +136,21 @@ These are errors which originate from faulty environment setup.
144
136
- #### MongoServerSelectionError
145
137
- Thrown when the driver fails to select a server to complete an operation
146
138
139
+ ### ` MongoCryptError `
140
+
141
+ These are errors thrown from the driver's client side encryption logic.
142
+
143
+ - #### MongoCryptInvalidArgumentError
144
+ - Thrown when an invalid argument has been provided to an encryption API
145
+ - #### MongoCryptInvalidCreateDataKeyError
146
+ - Thrown when the driver fails to create data keys for an encrypted collection
147
+ - #### MongoCryptInvalidCreateEncryptedCollectionError
148
+ - Thrown when the driver fails to create an encrypted collection
149
+ - #### MongoCryptInvalidCreateAzureKMSRequestError
150
+ - Thrown when the driver encounters an error when fetching Azure KMS credentials
151
+ - #### MongoCryptKMSRequestNetworkTimeoutError
152
+ - Thrown when the HTTP request to the IDMS server times out when fetching Azure KMS credentials
153
+
147
154
## Test Plan
148
155
149
156
The test plan consists of a series of prose tests.
0 commit comments