-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
MongoDB has a list of error codes here: https://github.com/mongodb/mongo/blob/master/src/mongo/base/error_codes.yml#L36. I think it would be helpful to have these error codes exposed as constants so that when handling `ServerErrors` when using the Go Driver, those constants can be used to handle specific errors. Otherwise, code that uses the go driver needs to copy + paste the error codes manually which can be error prone or might become out of sync. In addition, non-MongoDB employees might not easily know where to find these error codes.
This came up during some work on index migration as part of Realm Sync but I think this would be beneficial to users of the Go Driver in general.
- depends on
-
DOCS-10757 Document MongoDB error codes
- Closed