We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 807a66c commit 1abe21bCopy full SHA for 1abe21b
mongo/errors.go
@@ -252,8 +252,10 @@ type ServerError interface {
252
// HasErrorCodeWithMessage returns true if any of the contained errors have the specified code and message.
253
HasErrorCodeWithMessage(int, string) bool
254
255
- // ErrorCodes returns a deduplicated list of error codes returned by the
256
- // server.
+ // ErrorCodes returns all error codes (unsorted) in the server’s response.
+ // This would include nested errors (e.g., write concern errors) for
257
+ // supporting implementations (e.g., BulkWriteException) as well as the
258
+ // top-level error code.
259
ErrorCodes() []int
260
261
serverError()
0 commit comments