Skip to content

Commit 1abe21b

Browse files
GODRIVER-3086 Update ErrorCodes documentation
1 parent 807a66c commit 1abe21b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mongo/errors.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ type ServerError interface {
252252
// HasErrorCodeWithMessage returns true if any of the contained errors have the specified code and message.
253253
HasErrorCodeWithMessage(int, string) bool
254254

255-
// ErrorCodes returns a deduplicated list of error codes returned by the
256-
// server.
255+
// ErrorCodes returns all error codes (unsorted) in the server’s response.
256+
// 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.
257259
ErrorCodes() []int
258260

259261
serverError()

0 commit comments

Comments
 (0)