GODRIVER-4172Backlog
Maintain the error chain when returning a mongo.WriteException
h3. *Context* The [{{processWriteError}}|https://github.com/mongodb/mongo-go-driver/blob/3f2f028ee04bcb9e287ab4e23181873c540ec736/mongo/errors.go#L907] func converts all errors chains that contain type {{driver.WriteCommandError}} into a {{mongo.WriteException}}, but discards the error chain. As a result, the additional context from all wrapped and joined errors is completely missing from the returned error. That means that joined retry errors (added with GODRIVER-3600) are never returned from