Write errors while in a transaction is now reported as part of the write error field as opposed to the top level error. This is true for both mongod and mongos. Because of how we aggressively bail out early when encountering an error during a transaction, it is now possible (for the first time, I think) for (# of writeError + # of writeSucceeded) < nWritesInRequest, even for unordered writes.
SERVER-38583: when a write error occurs in a multi-statement transaction, report the error in the same format as if it failed outside of a transaction. Today, the mongos reply for write error in a transaction includes ok: 0 and the error is at the top level. It should reply with include ok: 1 and a writeErrors array, the same as it does outside a transaction.