You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -90,6 +115,15 @@ This class should **never** be directly instantiated.
90
115
|**MongoChangeStreamError**| Thrown when an error is encountered when operating on a ChangeStream. |
91
116
|**MongoGridFSStreamError**| Thrown when an unexpected state is reached when operating on a GridFS Stream. |
92
117
|**MongoGridFSChunkError**| Thrown when a malformed or invalid chunk is encountered when reading from a GridFS Stream. |
118
+
|**MongoUnexpectedServerResponseError**| Thrown when the driver receives a **parsable** response it did not expect from the server. |
119
+
120
+
### MongoUnexpectedServerResponseError
121
+
122
+
Intended for the scenario where the MongoDB returns an unexpected response in relation to some state the driver is in.
123
+
This error should **NOT** represent a response that couldn't be parsed due to errors in protocol formatting.
124
+
125
+
Ex. Server selection results in a feature detection change: this is not usually an unexpected response, but if while retrying an operation serverSelection returns a server with a lower wireVersion than expected, we can no longer proceed with the retry, so the response is unexpected in that case.
0 commit comments