Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4652

Driver error categories [Community Request]

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Not Needed

      Customer Feedback

      "I wish Mongo errors had some levels to them - like, "DuplicateKey" is an application-level error that is clearly recoverable, while "OutOfDiskSpace" is a system-critical error that needs to be handled immediately.

      I'd like to be able to do something like this pseudocode:

      {{if (error.level === Mongo.ERROR_CRITICAL) { system_critical_alert(); } else if (error.level === Mongo.ERROR_NETWORK) { system_offline(); } else { log(error); }}}

      ... without having to build my my own mapping of error codes that I have to maintain forever.

      Looking here it looks like there are some categories, but they don't look comprehensive (the two examples, "OutOfDiskSpace" and "DuplicateKey", do not have categories)."

      Full reddit thread 

      User Impact

      • Most popular comment on my reddit post soliciting feedback re: mongodb driver

            Assignee:
            Unassigned Unassigned
            Reporter:
            matthew.roknich@mongodb.com Matthew Roknich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: