Improve error when invalid session is passed in collection methods (v4)

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Error
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

              Assignee:
              Unassigned
              Reporter:
              Daria Pardue
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: