write-command: if writeErrors is non-empty, mark result as failed.

This will ensure we do not continue processing in the ordered bulk API
case. Otherwise, we could accidentially continue in the case of failure.