GODRIVER-3832 Make ClientBulkWriteException implement ServerError#2371
GODRIVER-3832 Make ClientBulkWriteException implement ServerError#2371FGasper wants to merge 1 commit intomongodb:masterfrom
Conversation
API Change Report./v2/mongocompatible changesClientBulkWriteException.ErrorCodes: added |
🧪 Performance ResultsCommit SHA: ad2b57bThe following benchmark tests for version 69ebd36170575f00079b6124 had statistically significant changes (i.e., |z-score| > 1.96):
For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch. |
matthewdale
left a comment
There was a problem hiding this comment.
The logic and change seem sound. ClientBulkWriteException is a server error, so it makes sense to make it implement the ServerError interface. @FGasper please add tests and we can get this merged! Thanks!
GODRIVER-3832
(NB: I’ll happily add tests if there are no obvious problems with how I’ve implemented this.)
Summary
This makes ClientBulkWriteException implement ServerError. In particular, it fixes the bug where mongo.ErrorCodes returned an empty list from a ClientBulkWriteException.
Background & Motivation
Without making ClientBulkWriteException at least implement errorCoder, mongo.ErrorCodes() gives the wrong result with Client.BulkWrite.
Since it’s fairly straightforward, this changeset adds the additional controls needed for ClientBulkWriteException to implement ServerError.