-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Error
When a user passes in an invalid session object to one of the collection methods, we should fail early instead of letting it fall through and throw errors that are confusing to the user down the line.
For example, passing in a number as the session option throws "TypeError: session.inTransaction is not a function" (coming from utils -> resolveOptions).
AC
- Add a proper validation error for session option
- Add unit test
- related to
-
NODE-3537 From 4.0.0 version excluding session from find query causing an error
- Closed