Improve Error Messages for Unsupported Features in MongoDB Community Edition and Single Instance Setups

XMLWordPrintableJSON

    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use Case

      As a Node.js developer, I would like the MongoDB Node.js driver to provide clear and explicit error messages when attempting to use features that are not supported in the Community Edition (such as client-side field level encryption, certain security features, etc.) or in single instance deployments (such as transactions).

      Currently, the driver often returns generic or implementation-specific errors, which makes it difficult to quickly identify that the root cause is a lack of feature support. This leads to unnecessary debugging and confusion.

      User Experience

      • While working with mongodb driver, I had 2 instances where I faced this issue
        • TRANSACTIONS: when I was trying to implement transactions I found after some digging that I cannot implement transactions on single instance mongodb. Message was somewhat clear mentioning about need of shards but not entirely.
        • CSFLE: recently I was trying to implement CSFLE for some collections which were holding sensative data and I found out later that its not supported fully in community version and I can only use AEAD_AES_256_CBC_HMAC_SHA_512-Random not the AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic I did not get error saying that it is not supported in community version but kept getting error about BSON type being invalid. Which is clearly misleading. BSON error is again correct in implementation standpoint but not by availablity of feature.
      • If bug: What is the number of impacted customers? How severe is the impact? Is anyone blocked or broken?

      Dependencies

      • upstream and/or downstream requirements and timelines to bear in mind

      Risks/Unknowns

      • What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
      • Is there an opportunity for better cross-driver alignment or testing in this area?
      • Is there an opportunity to improve existing documentation on this subject?

      Acceptance Criteria

      • When a developer attempts to use an unsupported feature, the error message should clearly state that the feature is not available in the current MongoDB edition or deployment type.
      • Example:
        • For transactions on a single instance:
          "Transactions are not supported on standalone MongoDB instances. Please use a replica set or sharded cluster."
        • For CSFLE or other Enterprise-only features:
          "Client-Side Field Level Encryption is only supported in MongoDB Enterprise or Atlas. Community Edition does not support this feature."
      • This will help developers make informed decisions and avoid unnecessary debugging.

      Implementation Requirements

      • functional reqs, potential snafus to avoid, performance targets, etc

      Testing Requirements

      • unit test, spec test sync, etc

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc
      • if node behavior differs/will differ from other drivers, confirm with dbx devs what standard to aim for and what plan, if any, exists to reconcile the diverging behavior moving forward

            Assignee:
            Alex Bevilacqua
            Reporter:
            Ajay Agrawal
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: