-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
Labels:
What problem are you facing?
Error handling in change streams relies on the error codes that are return in MongoSystemError objects. The current constructor of MongoSystemErrors is structured in such a way that the error code is stored in an object on the error and not as a top level property. This means that error handling code does not have access to the error code and for change streams.
Acceptance Criteria
- Store the `code` on the MongoSystemError as a top level property
Potential Additional Acceptance Criteria
- Many errors do not have tests associated with them. Convert the error.test.js tests to Typescript and add tests for any missing errors.
- There may be other errors that should propagate the `code` key as well. We could fix any errors that have a `code` as a part of this ticket.
- is depended on by
-
NODE-3893 ChangeStream closing when Mongo Atlas execute the rebalance (2)
- Closed