Throw PartialShardFailureException if response has failed shards

This is pull request for #387.