-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
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)."
User Impact
- Most popular comment on my reddit post soliciting feedback re: mongodb driver
- is duplicated by
-
NODE-4668 Expose MongoDB Error Types
- Closed